diff options
author | Jeff Layton <jlayton@samba.org> | 2012-12-07 08:39:16 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2012-12-07 08:39:16 -0500 |
commit | fac79a1425a1474f0daf0795900d227307ec5db3 (patch) | |
tree | c400531e6f477e76726bd20219dc3f97d9189b3f | |
parent | 53894f4e2cb4d15fedf0612e9a4bd47a537284b3 (diff) | |
download | cifs-utils-fac79a1425a1474f0daf0795900d227307ec5db3.tar.gz cifs-utils-fac79a1425a1474f0daf0795900d227307ec5db3.tar.bz2 cifs-utils-fac79a1425a1474f0daf0795900d227307ec5db3.zip |
getcifsacl: remove unneeded openlog() call
getcifsacl doesn't log to syslog, so there's no need to open a channel
to it. Also, remove the unneeded "prog" global variable since only
the usage() function needs it.
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | getcifsacl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/getcifsacl.c b/getcifsacl.c index 3f94a99..550429c 100644 --- a/getcifsacl.c +++ b/getcifsacl.c @@ -25,7 +25,6 @@ #include <string.h> #include <getopt.h> -#include <syslog.h> #include <stdint.h> #include <stdbool.h> #include <unistd.h> @@ -39,8 +38,6 @@ #include <sys/xattr.h> #include "cifsacl.h" -static const char *prog; - static void print_each_ace_mask(uint32_t mask) { @@ -355,7 +352,7 @@ parse_sec_desc(struct cifs_ntsd *pntsd, ssize_t acl_len, int raw) } static void -getcifsacl_usage(void) +getcifsacl_usage(const char *prog) { fprintf(stderr, "%s: Display CIFS/NTFS ACL in a security descriptor of a file object\n", @@ -376,9 +373,6 @@ main(const int argc, char *const argv[]) size_t bufsize = BUFSIZE; char *filename, *attrval; - prog = basename(argv[0]); - openlog(prog, 0, LOG_DAEMON); - while ((c = getopt_long(argc, argv, "r:v", NULL, NULL)) != -1) { switch (c) { case 'v': @@ -397,7 +391,7 @@ main(const int argc, char *const argv[]) else if (argc == 2) filename = argv[1]; else { - getcifsacl_usage(); + getcifsacl_usage(basename(argv[0])); return 0; } |