From ab9427420e4cf8c6c507987b461348f2faebe771 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 22 Aug 2010 19:36:09 +0000 Subject: [PATCH] * 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/chage.c, src/groupadd.c, src/login.c, src/grpconv.c, src/groups.c, src/grpunconv.c, src/chsh.c: Prog changed to a constant string. --- ChangeLog | 10 ++++++++++ src/chage.c | 2 +- src/chfn.c | 2 +- src/chgpasswd.c | 2 +- src/chpasswd.c | 2 +- src/chsh.c | 2 +- src/expiry.c | 2 +- src/gpasswd.c | 2 +- src/groupadd.c | 2 +- src/groupdel.c | 2 +- src/groupmems.c | 2 +- src/groupmod.c | 2 +- src/groups.c | 2 +- src/grpck.c | 2 +- src/grpconv.c | 2 +- src/grpunconv.c | 2 +- src/login.c | 2 +- src/logoutd.c | 2 +- src/newgrp.c | 2 +- src/newusers.c | 2 +- src/passwd.c | 2 +- src/pwck.c | 2 +- src/pwconv.c | 2 +- src/pwunconv.c | 2 +- src/su.c | 2 +- src/useradd.c | 2 +- src/userdel.c | 2 +- src/usermod.c | 2 +- 28 files changed, 37 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86658fbe..acb16c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-08-22 Nicolas François + + * 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/chage.c, + src/groupadd.c, src/login.c, src/grpconv.c, src/groups.c, + src/grpunconv.c, src/chsh.c: Prog changed to a constant string. + 2010-08-22 Nicolas François * libmisc/limits.c: Avoid implicit conversion of integer to diff --git a/src/chage.c b/src/chage.c index 55afb998..110445a2 100644 --- a/src/chage.c +++ b/src/chage.c @@ -65,7 +65,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool dflg = false, /* set last password change date */ diff --git a/src/chfn.c b/src/chfn.c index 677fc2f0..8857c8f1 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -58,7 +58,7 @@ /* * Global variables. */ -char *Prog; +const char *Prog; static char fullnm[BUFSIZ]; static char roomno[BUFSIZ]; static char workph[BUFSIZ]; diff --git a/src/chgpasswd.c b/src/chgpasswd.c index da4560ef..146f6219 100644 --- a/src/chgpasswd.c +++ b/src/chgpasswd.c @@ -57,7 +57,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool cflg = false; static bool eflg = false; static bool md5flg = false; diff --git a/src/chpasswd.c b/src/chpasswd.c index 55f8312f..37415506 100644 --- a/src/chpasswd.c +++ b/src/chpasswd.c @@ -53,7 +53,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool cflg = false; static bool eflg = false; static bool md5flg = false; diff --git a/src/chsh.c b/src/chsh.c index 21d3b8b4..d93a8091 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -61,7 +61,7 @@ /* * Global variables */ -char *Prog; /* Program name */ +const char *Prog; /* Program name */ static bool amroot; /* Real UID is root */ static char loginsh[BUFSIZ]; /* Name of new login shell */ /* command line options */ diff --git a/src/expiry.c b/src/expiry.c index c284d7c0..6718727b 100644 --- a/src/expiry.c +++ b/src/expiry.c @@ -42,7 +42,7 @@ #include "prototypes.h" /* Global variables */ -char *Prog; +const char *Prog; /* local function prototypes */ static RETSIGTYPE catch_signals (int); diff --git a/src/gpasswd.c b/src/gpasswd.c index 9c6ca6a2..ba854fbd 100644 --- a/src/gpasswd.c +++ b/src/gpasswd.c @@ -56,7 +56,7 @@ * Global variables */ /* The name of this command, as it is invoked */ -char *Prog; +const char *Prog; #ifdef SHADOWGRP /* Indicate if shadow groups are enabled on the system diff --git a/src/groupadd.c b/src/groupadd.c index 35b1da18..18d0d584 100644 --- a/src/groupadd.c +++ b/src/groupadd.c @@ -70,7 +70,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static /*@null@*/char *group_name; static gid_t group_id; diff --git a/src/groupdel.c b/src/groupdel.c index 569cec4e..afd28b1b 100644 --- a/src/groupdel.c +++ b/src/groupdel.c @@ -55,7 +55,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static char *group_name; static gid_t group_id = -1; diff --git a/src/groupmems.c b/src/groupmems.c index 8202cf90..5bb2ebe3 100644 --- a/src/groupmems.c +++ b/src/groupmems.c @@ -64,7 +64,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static char *adduser = NULL; static char *deluser = NULL; diff --git a/src/groupmod.c b/src/groupmod.c index da6d77f2..7d0d3fbc 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -69,7 +69,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; #ifdef SHADOWGRP static bool is_shadow_grp; diff --git a/src/groups.c b/src/groups.c index 3c5ae980..fcd669b0 100644 --- a/src/groups.c +++ b/src/groups.c @@ -42,7 +42,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; /* local function prototypes */ static void print_groups (const char *member); diff --git a/src/grpck.c b/src/grpck.c index 15d5f9fb..b0ae23a9 100644 --- a/src/grpck.c +++ b/src/grpck.c @@ -64,7 +64,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static const char *grp_file = GROUP_FILE; static bool use_system_grp_file = true; diff --git a/src/grpconv.c b/src/grpconv.c index 18aa2659..86038bde 100644 --- a/src/grpconv.c +++ b/src/grpconv.c @@ -53,7 +53,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool gr_locked = false; static bool sgr_locked = false; diff --git a/src/grpunconv.c b/src/grpunconv.c index f7235295..d55f1831 100644 --- a/src/grpunconv.c +++ b/src/grpunconv.c @@ -54,7 +54,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool gr_locked = false; static bool sgr_locked = false; diff --git a/src/login.c b/src/login.c index e97e0b78..c24fc860 100644 --- a/src/login.c +++ b/src/login.c @@ -82,7 +82,7 @@ static pam_handle_t *pamh = NULL; /* * Global variables */ -char *Prog; +const char *Prog; static const char *hostname = ""; static /*@null@*/ /*@only@*/char *username = NULL; diff --git a/src/logoutd.c b/src/logoutd.c index 45484923..1503a743 100644 --- a/src/logoutd.c +++ b/src/logoutd.c @@ -43,7 +43,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; #ifndef DEFAULT_HUP_MESG #define DEFAULT_HUP_MESG _("login time exceeded\n\n") diff --git a/src/newgrp.c b/src/newgrp.c index 10204c7c..578387aa 100644 --- a/src/newgrp.c +++ b/src/newgrp.c @@ -48,7 +48,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; extern char **newenvp; extern char **environ; diff --git a/src/newusers.c b/src/newusers.c index 62cd3daa..92459de7 100644 --- a/src/newusers.c +++ b/src/newusers.c @@ -70,7 +70,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool rflg = false; /* create a system account */ #ifndef USE_PAM diff --git a/src/passwd.c b/src/passwd.c index ba88b2d5..2a357f2a 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -70,7 +70,7 @@ /* * Global variables */ -char *Prog; /* Program name */ +const char *Prog; /* Program name */ static char *name; /* The name of user whose password is being changed */ static char *myname; /* The current user's name */ diff --git a/src/pwck.c b/src/pwck.c index 316797f1..fe0e84ac 100644 --- a/src/pwck.c +++ b/src/pwck.c @@ -66,7 +66,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool use_system_pw_file = true; static bool use_system_spw_file = true; diff --git a/src/pwconv.c b/src/pwconv.c index 07a7d719..8d004504 100644 --- a/src/pwconv.c +++ b/src/pwconv.c @@ -86,7 +86,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool spw_locked = false; static bool pw_locked = false; diff --git a/src/pwunconv.c b/src/pwunconv.c index 82876718..3d27e964 100644 --- a/src/pwunconv.c +++ b/src/pwunconv.c @@ -48,7 +48,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static bool spw_locked = false; static bool pw_locked = false; diff --git a/src/su.c b/src/su.c index 304bb281..e45702f9 100644 --- a/src/su.c +++ b/src/su.c @@ -77,7 +77,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; /* not needed by sulog.c anymore */ static char name[BUFSIZ]; diff --git a/src/useradd.c b/src/useradd.c index 0b15a8f5..e8348b9f 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -85,7 +85,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; /* * These defaults are used if there is no defaults file. diff --git a/src/userdel.c b/src/userdel.c index 817464ed..8f2ac0fe 100644 --- a/src/userdel.c +++ b/src/userdel.c @@ -78,7 +78,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static char *user_name; static uid_t user_id; diff --git a/src/usermod.c b/src/usermod.c index 5918cbd3..636c12d2 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -89,7 +89,7 @@ /* * Global variables */ -char *Prog; +const char *Prog; static char *user_name; static char *user_newname;