* src/newgrp.c, src/userdel.c, src/grpck.c, src/gpasswd.c,
src/newusers.c, src/pwconv.c, src/chpasswd.c, src/logoutd.c, src/chfn.c, src/groupmems.c, src/usermod.c, src/pwunconv.c, src/expiry.c, src/groupdel.c, src/chgpasswd.c, src/useradd.c, src/su.c, src/groupmod.c, src/passwd.c, src/pwck.c, src/groupadd.c, src/chage.c, src/login.c, src/grpconv.c, src/groups.c, src/grpunconv.c, src/chsh.c: Prog is now global (not static to the file) so that it can be used by the helper functions of libmisc. * lib/prototypes.h: Added extern char *Prog. * libmisc/find_new_gid.c, libmisc/find_new_uid.c: Indicate the program name with the warning.
This commit is contained in:
+6
-2
@@ -40,6 +40,10 @@
|
||||
#include <sys/types.h>
|
||||
#include "defines.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
/* Global variables */
|
||||
char *Prog;
|
||||
|
||||
/* local function prototypes */
|
||||
static RETSIGTYPE catch_signals (int);
|
||||
static void usage (void);
|
||||
@@ -70,9 +74,9 @@ static void usage (void)
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
struct passwd *pwd;
|
||||
|
||||
struct spwd *spwd;
|
||||
char *Prog = Basename (argv[0]);
|
||||
|
||||
Prog = Basename (argv[0]);
|
||||
|
||||
sanitize_env ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user