diff options
author | LOLi <[email protected]> | 2018-09-06 22:11:21 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-09-06 13:11:21 -0700 |
commit | 0238a9755b07d1a2705e970f5c09fb7fa261ea5d (patch) | |
tree | 529db628c180b9399784df53c8b9aaadd2a0bced | |
parent | cc99f275a28c43fe450a66a7544f73c4935f7361 (diff) |
Fix 'zfs allow' for create time permissions
When no permission set is defined for a dataset the create time
permissions are incorrectly shown as if they were a permission set.
This change simply correct how allow permissions are displayed.
This commit also fixes a small manpage formatting issue and adds the
"zfs_allow_003_pos" test case to the ZFS Test Suite.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #7519
Closes #7860
-rw-r--r-- | cmd/zfs/zfs_main.c | 3 | ||||
-rw-r--r-- | man/man8/zfs.8 | 6 | ||||
-rw-r--r-- | tests/runfiles/linux.run | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 1a91b031a..dcfb6e80a 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -5476,7 +5476,6 @@ print_set_creat_perms(uu_avl_t *who_avl) gettext("Create time permissions:\n"), NULL }; - const char **title_ptr = sc_title; who_perm_node_t *who_node = NULL; int prev_weight = -1; @@ -5490,7 +5489,7 @@ print_set_creat_perms(uu_avl_t *who_avl) deleg_perm_node_t *deleg_node; if (prev_weight != weight) { - (void) printf("%s", *title_ptr++); + (void) printf("%s", sc_title[weight]); prev_weight = weight; } diff --git a/man/man8/zfs.8 b/man/man8/zfs.8 index 935d19c32..00196d9bd 100644 --- a/man/man8/zfs.8 +++ b/man/man8/zfs.8 @@ -4049,7 +4049,8 @@ command restricts modifications of the global namespace to the root user. .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume -.br +.Xc +.It Xo .Nm .Cm allow .Op Fl dl @@ -4232,7 +4233,8 @@ and can be no more than 64 characters long. .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar setname Oc Ns ... Oc .Ar filesystem Ns | Ns Ar volume -.br +.Xc +.It Xo .Nm .Cm unallow .Op Fl dlr diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 0a4b26c06..0090fe30d 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -513,7 +513,7 @@ post = tags = ['functional', 'deadman'] [tests/functional/delegate] -tests = ['zfs_allow_001_pos', 'zfs_allow_002_pos', +tests = ['zfs_allow_001_pos', 'zfs_allow_002_pos', 'zfs_allow_003_pos', 'zfs_allow_004_pos', 'zfs_allow_005_pos', 'zfs_allow_006_pos', 'zfs_allow_007_pos', 'zfs_allow_008_pos', 'zfs_allow_009_neg', 'zfs_allow_010_pos', 'zfs_allow_011_neg', 'zfs_allow_012_neg', |