Project

General

Profile

Bug #3816

"zfs allow" mis-displays filesystems with "allow -c" but not "allow -s" set

Added by Bill Sommerfeld about 7 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2013-06-15
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

If you add a "create-time permission" with "zfs allow -c" to a filesystem that doesn't have any permission-sets defined, zfs allow mis-displays the permissions - it labels the "Create-time permissions" as "Permission sets".

If you add a permission set definition, the right thing happens:

to reproduce:

zfs create tank/test
zfs allow -c send tank/test
zfs allow tank/test
[this is where you get erroneous output]

zfs allow -s @foo receive tank/test
zfs allow tank/test
[this is where you get correct output]

Bug appears to be in usr/src/cmd/zfs/zfs_main.c : print_set_creat_perms(). Looks like it should be using the return value of who_type2weight() to index into sc_title[] rather than assuming there will always be a permission set present if there are create-time permissions.


Files

3816.patch (886 Bytes) 3816.patch draft patch for this problem Bill Sommerfeld, 2013-10-04 09:30 PM

Related issues

Related to illumos gate - Feature #278: get rid zfs of python and pyzfs dependenciesResolved2010-09-28

Actions

History

#1

Updated by Marcel Telka over 6 years ago

  • Category set to zfs - Zettabyte File System
#2

Updated by Bill Sommerfeld over 6 years ago

FYI I've got a patch for this that I need to clean up and share.

#3

Updated by Bill Sommerfeld over 6 years ago

I've attached what I have now; probably could be improved.

Also available in: Atom PDF