diff options
author | Jeff Layton <jlayton@samba.org> | 2012-12-07 12:07:23 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2012-12-13 09:33:14 -0500 |
commit | b4dc50798e6baf026d6101ff3775ffc0c3a0e2f2 (patch) | |
tree | d0fa6d2cdbe5600e22c7244c82a2421c639a4293 | |
parent | fac79a1425a1474f0daf0795900d227307ec5db3 (diff) | |
download | cifs-utils-b4dc50798e6baf026d6101ff3775ffc0c3a0e2f2.tar.gz cifs-utils-b4dc50798e6baf026d6101ff3775ffc0c3a0e2f2.tar.bz2 cifs-utils-b4dc50798e6baf026d6101ff3775ffc0c3a0e2f2.zip |
setcifsacl: remove syslog goop
setcifsacl doesn't use syslog, so no need to open a channel to it.
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | setcifsacl.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/setcifsacl.c b/setcifsacl.c index 593997a..e8c10a9 100644 --- a/setcifsacl.c +++ b/setcifsacl.c @@ -26,7 +26,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; - enum setcifsacl_actions { ActUnknown = -1, ActDelete, @@ -732,7 +729,7 @@ setacl_action(struct cifs_ntsd *pntsd, struct cifs_ntsd **npntsd, } static void -setcifsacl_usage(void) +setcifsacl_usage(const char *prog) { fprintf(stderr, "%s: Alter CIFS/NTFS ACL in a security descriptor of a file object\n", @@ -771,10 +768,6 @@ main(const int argc, char *const argv[]) struct cifs_ace **cacesptr = NULL, **facesptr = NULL; struct cifs_ntsd *ntsdptr = NULL; - prog = basename(argv[0]); - - openlog(prog, 0, LOG_DAEMON); - c = getopt(argc, argv, "hvD:M:a:S:"); switch (c) { case 'D': @@ -794,19 +787,19 @@ main(const int argc, char *const argv[]) ace_list = optarg; break; case 'h': - setcifsacl_usage(); + setcifsacl_usage(basename(argv[0])); return 0; case 'v': printf("Version: %s\n", VERSION); return 0; default: - setcifsacl_usage(); + setcifsacl_usage(basename(argv[0])); return -1; } /* We expect 1 argument in addition to the option */ if (argc != 4) { - setcifsacl_usage(); + setcifsacl_usage(basename(argv[0])); return -1; } filename = argv[3]; |