From nobody Thu Apr 25 06:07:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574786613; cv=none; d=zohomail.com; s=zohoarc; b=drsAl25+fxs1NpJI+OVCHc8bnpwc/t9McmXC3u7LIXaov+MnJv0cQxG21BaluInqxYiuwkJnxSCh8uq7Y3xL/NbZ7aZg7+ydFFqKhw4mGBIgxQp4pReEGxNd6LNlJD3sVvrzhdnQ6iNh1Ze7Tv6EzXzRnVfLVsMZoVG4QtOuFHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574786613; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=kOdskRsYMtjgZir4rm6Tqe3qmY3q/8NrL6xBoK81CQM=; b=JyTQQay1BFXv9+9Huedmq5EPO7bUPW/y/WeAMFj2gZnxIG55RVwTH7V/IlUiMdqbCIm06Chd+XxImMWJatkj5si6L6jx3+byYwJAry6WY1dPFhsm1VnLVeU4UZKw3OV9AAphIhZAM/iZyZ7MjWznbAWtG48tSsY9tgnbN42MC+g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 157478661331216.24547152090736; Tue, 26 Nov 2019 08:43:33 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-FAtygU-EMvm4XIPGlfDKqg-1; Tue, 26 Nov 2019 11:43:30 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FD9C1034B20; Tue, 26 Nov 2019 16:43:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0A7810016EB; Tue, 26 Nov 2019 16:43:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F125D4BB65; Tue, 26 Nov 2019 16:43:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAQGhKfA017088 for ; Tue, 26 Nov 2019 11:43:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1FE1D1001902; Tue, 26 Nov 2019 16:43:20 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (dhcp-32.gsslab.fab.redhat.com [10.33.9.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 848631001901; Tue, 26 Nov 2019 16:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574786612; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=kOdskRsYMtjgZir4rm6Tqe3qmY3q/8NrL6xBoK81CQM=; b=daP1usb1LDI5nWuOSVQdPeLXw2BalslYXr6IXiEbBdiAiJtlJdhkZboeyweW2C96Au3KBM A9i3FN1pneAZ9rTXqsx9cykCIeejo2bysnwcZAZm8dP9RZV5F24vAtlqBHtMdZrSxK0hPC 6uk1C72jqGYl96qK4Ki3SLO2CaWvP60= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 26 Nov 2019 16:36:30 +0000 Message-Id: <20191126163630.20589-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] util: whitelist Oracle ACFS as a shared filesystem X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: FAtygU-EMvm4XIPGlfDKqg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The magic number is taken from the coreutils stat.c file since there is no constant for it in normal system headers. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Daniel Henrique Barboza --- src/util/virfile.c | 8 +++++++- src/util/virfile.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index fca7ff9d35..3dd2b1a527 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3426,6 +3426,8 @@ int virFilePrintf(FILE *fp, const char *msg, ...) # define QB_MAGIC 0x51626d6e # endif =20 +# define VIR_ACFS_MAGIC 0x61636673 + # define PROC_MOUNTS "/proc/mounts" =20 static int @@ -3578,6 +3580,9 @@ virFileIsSharedFSType(const char *path, if ((fstypes & VIR_FILE_SHFS_QB) && (f_type =3D=3D QB_MAGIC)) return 1; + if ((fstypes & VIR_FILE_SHFS_ACFS) && + (f_type =3D=3D VIR_ACFS_MAGIC)) + return 1; =20 return 0; } @@ -3765,7 +3770,8 @@ int virFileIsSharedFS(const char *path) VIR_FILE_SHFS_CIFS | VIR_FILE_SHFS_CEPH | VIR_FILE_SHFS_GPFS| - VIR_FILE_SHFS_QB); + VIR_FILE_SHFS_QB | + VIR_FILE_SHFS_ACFS); } =20 =20 diff --git a/src/util/virfile.h b/src/util/virfile.h index 9a8709b52c..bcae40ee06 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -209,6 +209,7 @@ enum { VIR_FILE_SHFS_CEPH =3D (1 << 6), VIR_FILE_SHFS_GPFS =3D (1 << 7), VIR_FILE_SHFS_QB =3D (1 << 8), + VIR_FILE_SHFS_ACFS =3D (1 << 9), }; =20 int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL= (1); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list