From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id ABBFF1F4B4 for ; Tue, 27 Oct 2020 21:25:06 +0000 (UTC) Received: from localhost ([::1]:46774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXWSn-0005KU-T2 for normalperson@yhbt.net; Tue, 27 Oct 2020 17:25:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXWRI-0004Hc-EG for bug-gnulib@gnu.org; Tue, 27 Oct 2020 17:23:32 -0400 Received: from smtp.magicbluesmoke.com ([52.210.84.128]:58514 helo=mail.magicbluesmoke.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXWRF-0004Fj-80 for bug-gnulib@gnu.org; Tue, 27 Oct 2020 17:23:31 -0400 Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net [86.42.14.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 22094453D7F; Tue, 27 Oct 2020 21:23:23 +0000 (UTC) From: =?UTF-8?q?P=C3=A1draig=20Brady?= To: bug-gnulib@gnu.org Subject: [PATCH] mountlist: recognize more file system types as remote Date: Tue, 27 Oct 2020 21:23:15 +0000 Message-Id: <20201027212315.86480-1-P@draigBrady.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=52.210.84.128; envelope-from=P@draigBrady.com; helo=mail.magicbluesmoke.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/27 16:12:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.4, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Sync "remote" file systems from stat.c in coreutils. Note we only consider file systems that do not use host:resource mount source. I.e. those that don't generally use a colon when mounting, as that case is already considered. Searching for " /etc/fstab" was informative for identifying these. The full list of "remote" file systems in coreutils is currently: acfs afs ceph cifs coda fhgfs fuseblk fusectl gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs Note also we include virtual machine file systems, as though they may not be distributed to separate hosts, they're remote to the current kernel. * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered "remote" file systems from stat.c in coreutils. --- ChangeLog | 7 +++++++ lib/mountlist.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4eb5bcb1d..41e284558 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-10-27 Pádraig Brady + + mountlist: recognize more file system types as remote + + * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered + "remote" file systems from stat.c in coreutils. + 2020-10-26 Paul Eggert sys_stat: update comments for S_IRWXUGO, S_IXUGO diff --git a/lib/mountlist.c b/lib/mountlist.c index ca1be63f2..8205c29bd 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -224,7 +224,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) #ifndef ME_REMOTE /* A file system is "remote" if its Fs_name contains a ':' or if (it is of type (smbfs or cifs) and its Fs_name starts with '//') - or if it is of type (afs or auristorfs) + or if it is of any other of the listed types or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */ # define ME_REMOTE(Fs_name, Fs_type) \ (strchr (Fs_name, ':') != NULL \ @@ -233,8 +233,17 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) && (strcmp (Fs_type, "smbfs") == 0 \ || strcmp (Fs_type, "smb3") == 0 \ || strcmp (Fs_type, "cifs") == 0)) \ + || strcmp (Fs_type, "acfs") == 0 \ || strcmp (Fs_type, "afs") == 0 \ + || strcmp (Fs_type, "coda") == 0 \ || strcmp (Fs_type, "auristorfs") == 0 \ + || strcmp (Fs_type, "fhgfs") == 0 \ + || strcmp (Fs_type, "gpfs") == 0 \ + || strcmp (Fs_type, "ibrix") == 0 \ + || strcmp (Fs_type, "ocfs2") == 0 \ + || strcmp (Fs_type, "prl_fs") == 0 \ + || strcmp (Fs_type, "vboxsf") == 0 \ + || strcmp (Fs_type, "vxfs") == 0 \ || strcmp ("-hosts", Fs_name) == 0) #endif -- 2.26.2