]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: allow lsattr & lsproj on foreign filesystems
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Fri, 4 Aug 2017 21:33:51 +0000 (16:33 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 4 Aug 2017 21:33:51 +0000 (16:33 -0500)
The following commit:

commit 73b54bb6a2fb ("xfs_io: allow chattr & chproj on foreign filesystems")

allowed chattr and chproj to be run on non-xfs filesystems now that
FS_IOC_FSSETXATTR is a generic vfs call.  It failed to enable the
corresponding lsattr and lsproj commands for those filesystems, though.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Fixes: 73b54bb6a2fb ("xfs_io: allow chattr & chproj on foreign filesystems")
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/attr.c
io/open.c

index b8eec1be5ec9468a417a3db38b0fccf8b6ebaeb0..728560e1d1fb5e92134985e7ac1175900cf11a12 100644 (file)
--- a/io/attr.c
+++ b/io/attr.c
@@ -353,7 +353,7 @@ attr_init(void)
        lsattr_cmd.args = _("[-R|-D|-a|-v]");
        lsattr_cmd.argmin = 0;
        lsattr_cmd.argmax = 1;
-       lsattr_cmd.flags = CMD_NOMAP_OK;
+       lsattr_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
        lsattr_cmd.oneline =
                _("list extended inode flags set on the currently open file");
        lsattr_cmd.help = lsattr_help;
index b50f0681045daaa288d3989b3f5ca8de723237d1..f2ea7c3278083399ba0d60303e8fe318c17cc921 100644 (file)
--- a/io/open.c
+++ b/io/open.c
@@ -812,7 +812,7 @@ open_init(void)
        lsproj_cmd.args = _("[-D | -R]");
        lsproj_cmd.argmin = 0;
        lsproj_cmd.argmax = -1;
-       lsproj_cmd.flags = CMD_NOMAP_OK;
+       lsproj_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
        lsproj_cmd.oneline =
                _("list project identifier set on the currently open file");
        lsproj_cmd.help = lsproj_help;