setcifsacl doesn't use syslog, so no need to open a channel to it.
Signed-off-by: Jeff Layton <[email protected]>
---
setcifsacl.c | 15 ++++-----------
1 file 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];
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html