summaryrefslogtreecommitdiffstats
path: root/src/grpconv.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 16:18:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 16:18:39 +0000
commit5242eef8fc54636a41701fd9d7083ba6e4a4e0b3 (patch)
treee6a0980092957865a937cc0f34446df3d5194e99 /src/grpconv.c
parentReleasing progress-linux version 1:4.13+dfsg1-5~progress7.99u1. (diff)
downloadshadow-5242eef8fc54636a41701fd9d7083ba6e4a4e0b3.tar.xz
shadow-5242eef8fc54636a41701fd9d7083ba6e4a4e0b3.zip
Merging upstream version 1:4.15.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/grpconv.c')
-rw-r--r--src/grpconv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/grpconv.c b/src/grpconv.c
index 57d8d58..4d941cd 100644
--- a/src/grpconv.c
+++ b/src/grpconv.c
@@ -21,9 +21,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <getopt.h>
+
+#include "attr.h"
#include "nscd.h"
#include "sssd.h"
#include "prototypes.h"
@@ -36,7 +39,7 @@
/*
* Global variables
*/
-const char *Prog;
+static const char Prog[] = "grpconv";
static bool gr_locked = false;
static bool sgr_locked = false;
@@ -123,7 +126,6 @@ int main (int argc, char **argv)
const struct sgrp *sg;
struct sgrp sgent;
- Prog = Basename (argv[0]);
log_set_progname(Prog);
log_set_logfd(stderr);
@@ -133,7 +135,7 @@ int main (int argc, char **argv)
process_root_flag ("-R", argc, argv);
- OPENLOG ("grpconv");
+ OPENLOG (Prog);
process_flags (argc, argv);
@@ -198,7 +200,7 @@ int main (int argc, char **argv)
static char *empty = 0;
/* add new shadow group entry */
- memset (&sgent, 0, sizeof sgent);
+ bzero(&sgent, sizeof sgent);
sgent.sg_name = gr->gr_name;
sgent.sg_passwd = gr->gr_passwd;
sgent.sg_adm = &empty;
@@ -259,7 +261,7 @@ int main (int argc, char **argv)
return 0;
}
#else /* !SHADOWGRP */
-int main (int unused(argc), char **argv)
+int main (MAYBE_UNUSED int argc, char **argv)
{
fprintf (stderr,
"%s: not configured for shadow group support.\n", argv[0]);