This saves a tiny bit of memory, and doesn't make the program assume
that the binary is named something in particular.
Signed-off-by: Jeff Layton <jlayton@samba.org>
#include <sys/xattr.h>
#include "cifsacl.h"
-static const char *prog = "getcifsacl";
+static const char *prog;
static void
print_each_ace_mask(uint32_t mask)
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) {
#include <sys/xattr.h>
#include "cifsacl.h"
-static const char *prog = "setcifsacl";
+static const char *prog;
static void
copy_sec_desc(const struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd,
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, "v:D:M:a:S:?");