@@ -38,7 +38,7 @@
#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)
@@ -333,6 +333,7 @@ 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) {
@@ -39,7 +39,7 @@
#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,
@@ -775,6 +775,8 @@ 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, "v:D:M:a:S:?");
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> --- getcifsacl.c | 3 ++- setcifsacl.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)