Project

General

Profile

Actions

Feature #1213

open

chmod could handle empty access mask as wildcard when removing user/group ACEs

Added by Yuri Pankov about 12 years ago. Updated about 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2011-07-14
Due date:
% Done:

0%

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

Description

The idea is to make chmod handle empty access mask as wildcard when removing user/group ACEs, e.g.:

$ mkdir test; chmod A+user:root:rwx:allow,user:bin:rwx:deny test; ls -Vd test; LD_PRELOAD=~/ws/local/proto/root_i386/usr/lib/libsec.so.1 chmod A-user:root::allow test; ls -Vd test; LD_PRELOAD=~/ws/local/proto/root_i386/usr/lib/libsec.so.1 chmod A-user:bin::deny test; ls -Vd test
drwxr-xr-x+  2 yuri     staff          2 Jul 14 19:28 test
              user:root:rwx-----------:-------:allow
               user:bin:rwx-----------:-------:deny
                 owner@:rwxp--aARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
drwxr-xr-x+  2 yuri     staff          2 Jul 14 19:28 test
               user:bin:rwx-----------:-------:deny
                 owner@:rwxp--aARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow
drwxr-xr-x   2 yuri     staff          2 Jul 14 19:28 test
                 owner@:rwxp--aARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow

While here, we should deny creating ACEs with empty access mask as they make no sense (or am I missing something here)?

Patch attached.


Files

acls.diff (2.81 KB) acls.diff Yuri Pankov, 2011-07-14 03:33 PM
Actions #1

Updated by Gordon Ross about 12 years ago

I would find this useful.

Actions

Also available in: Atom PDF