summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2009-02-09 00:50:51 +0100
committerAndreas Gruenbacher <agruen@suse.de>2009-02-23 02:39:03 +0100
commit0932320961c5e4aae3aabf50a273c7b8adb9df8f (patch)
treede6f7496dfe9449a30119fcce6c37a2d29ff6e91
parent9c3a18a1eb513290e3ae40d04254b8ed9b708cc1 (diff)
downloadacl-0932320961c5e4aae3aabf50a273c7b8adb9df8f.tar.gz
acl: add short option support to the acl commands
Resolves Red Hat bugs: rh#204087 - getfacl/setfacl should support -n rh#457244 - setfacl does not recognize -v and -h Folds in [PATCH] Manpage documents -r instead of -t now From: Jiri Moskovcak <jmoskovc@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
-rw-r--r--getfacl/getfacl.c22
-rw-r--r--man/man1/getfacl.125
-rw-r--r--man/man1/setfacl.14
-rw-r--r--setfacl/setfacl.c8
4 files changed, 31 insertions, 28 deletions
diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c
index 77315f3..ab050ba 100644
--- a/getfacl/getfacl.c
+++ b/getfacl/getfacl.c
@@ -43,7 +43,7 @@
#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT"
#if !POSIXLY_CORRECT
-# define CMD_LINE_OPTIONS "dRLP"
+# define CMD_LINE_OPTIONS "aceEsRLPtpndvh"
#endif
#define POSIXLY_CMD_LINE_OPTIONS "d"
@@ -555,23 +555,23 @@ void help(void)
#if !POSIXLY_CORRECT
} else {
printf(_(
-" --access display the file access control list only\n"
+" -a, --access display the file access control list only\n"
" -d, --default display the default access control list only\n"
-" --omit-header do not display the comment header\n"
-" --all-effective print all effective rights\n"
-" --no-effective print no effective rights\n"
-" --skip-base skip files that only have the base entries\n"
+" -c, --omit-header do not display the comment header\n"
+" -e, --all-effective print all effective rights\n"
+" -E, --no-effective print no effective rights\n"
+" -s, --skip-base skip files that only have the base entries\n"
" -R, --recursive recurse into subdirectories\n"
" -L, --logical logical walk, follow symbolic links\n"
" -P, --physical physical walk, do not follow symbolic links\n"
-" --tabular use tabular output format\n"
-" --numeric print numeric user/group identifiers\n"
-" --absolute-names don't strip leading '/' in pathnames\n"));
+" -t, --tabular use tabular output format\n"
+" -n, --numeric print numeric user/group identifiers\n"
+" -p, --absolute-names don't strip leading '/' in pathnames\n"));
}
#endif
printf(_(
-" --version print version and exit\n"
-" --help this help text\n"));
+" -v, --version print version and exit\n"
+" -h, --help this help text\n"));
}
int main(int argc, char *argv[])
diff --git a/man/man1/getfacl.1 b/man/man1/getfacl.1
index a702e8e..387d736 100644
--- a/man/man1/getfacl.1
+++ b/man/man1/getfacl.1
@@ -12,10 +12,10 @@ getfacl \- get file access control lists
.SH SYNOPSIS
.B getfacl
-[\-dRLPvh] file ...
+[\-aceEsRLPtpndvh] file ...
.B getfacl
-[\-dRLPvh] \-
+[\-aceEsRLPtpndvh] \-
.SH DESCRIPTION
For each file, getfacl displays the file name, owner, the group,
@@ -78,22 +78,22 @@ accessing the file mode.
.SS OPTIONS
.TP 4
-.I \-\-access
+.I \-a, \-\-access
Display the file access control list.
.TP
.I \-d, \-\-default
Display the default access control list.
.TP
-.I \-\-omit-header
+.I \-c, \-\-omit-header
Do not display the comment header (the first three lines of each file's output).
.TP
-.I \-\-all-effective
+.I \-e, \-\-all-effective
Print all effective rights comments, even if identical to the rights defined by the ACL entry.
.TP
-.I \-\-no-effective
+.I \-E, \-\-no-effective
Do not print effective rights comments.
.TP
-.I \-\-skip-base
+.I \-s, \-\-skip-base
Skip files that only have the base ACL entries (owner, group, others).
.TP
.I \-R, \-\-recursive
@@ -109,17 +109,20 @@ Physical walk, do not follow symbolic links to directories. This also skips symb
link arguments.
Only effective in combination with \-R.
.TP
-.I \-\-tabular
+.I \-t, \-\-tabular
Use an alternative tabular output format. The ACL and the default ACL are displayed side by side. Permissions that are ineffective due to the ACL mask entry are displayed capitalized. The entry tag names for the ACL_USER_OBJ and ACL_GROUP_OBJ entries are also displayed in capital letters, which helps in spotting those entries.
.TP
-.I \-\-absolute-names
+.I \-p, \-\-absolute-names
Do not strip leading slash characters (`/'). The default behavior is to
strip leading slash characters.
.TP
-.I \-\-version
+.I \-n, \-\-numeric
+List numeric user and group IDs
+.TP
+.I \-v, \-\-version
Print the version of getfacl and exit.
.TP
-.I \-\-help
+.I \-h, \-\-help
Print help explaining the command line options.
.TP
.I \-\-
diff --git a/man/man1/setfacl.1 b/man/man1/setfacl.1
index 92d3b18..8f38568 100644
--- a/man/man1/setfacl.1
+++ b/man/man1/setfacl.1
@@ -115,10 +115,10 @@ This also skips symbolic link arguments.
Only effective in combination with \-R.
This option cannot be mixed with `\-\-restore'.
.TP 4
-.I \-\-version
+.I \-v, \-\-version
Print the version of setfacl and exit.
.TP 4
-.I \-\-help
+.I \-h, \-\-help
Print help explaining the command line options.
.TP 4
.I \-\-
diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
index 8bb0465..1b6864c 100644
--- a/setfacl/setfacl.c
+++ b/setfacl/setfacl.c
@@ -42,10 +42,10 @@ extern int do_set(const char *path_p, const struct stat *stat_p, int flags, void
/* '-' stands for `process non-option arguments in loop' */
#if !POSIXLY_CORRECT
-# define CMD_LINE_OPTIONS "-:bkndm:M:x:X:RLP"
+# define CMD_LINE_OPTIONS "-:bkndvhm:M:x:X:RLP"
# define CMD_LINE_SPEC "[-bkndRLP] { -m|-M|-x|-X ... } file ..."
#endif
-#define POSIXLY_CMD_LINE_OPTIONS "-:bkndm:M:x:X:"
+#define POSIXLY_CMD_LINE_OPTIONS "-:bkndvhm:M:x:X:"
#define POSIXLY_CMD_LINE_SPEC "[-bknd] {-m|-M|-x|-X ... } file ..."
struct option long_options[] = {
@@ -265,8 +265,8 @@ void help(void)
}
#endif
printf(_(
-" --version print version and exit\n"
-" --help this help text\n"));
+" -v, --version print version and exit\n"
+" -h, --help this help text\n"));
}