* src/chfn.c, src/chgpasswd.c, src/chpasswd.c, src/gpasswd.c,
src/groupadd.c, src/groupdel.c, src/groupmems.c, src/groupmod.c, src/grpconv.c, src/grpunconv.c, src/newusers.c, src/pwconv.c, src/pwunconv.c, src/useradd.c, src/userdel.c: Harmonize the name of the variables keeping the lock status, to match the shadow library prefixes.
This commit is contained in:
@@ -53,18 +53,18 @@
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
static bool group_locked = false;
|
||||
static bool gshadow_locked = false;
|
||||
static bool gr_locked = false;
|
||||
static bool sgr_locked = false;
|
||||
|
||||
/* local function prototypes */
|
||||
static void fail_exit (int);
|
||||
|
||||
static void fail_exit (int status)
|
||||
{
|
||||
if (group_locked) {
|
||||
if (gr_locked) {
|
||||
gr_unlock ();
|
||||
}
|
||||
if (gshadow_locked) {
|
||||
if (sgr_locked) {
|
||||
sgr_unlock ();
|
||||
}
|
||||
exit (status);
|
||||
@@ -88,7 +88,7 @@ int main (int argc, char **argv)
|
||||
Prog, gr_dbname ());
|
||||
fail_exit (5);
|
||||
}
|
||||
group_locked = true;
|
||||
gr_locked = true;
|
||||
if (gr_open (O_RDWR) == 0) {
|
||||
fprintf (stderr, _("%s: cannot open %s\n"), Prog, gr_dbname ());
|
||||
fail_exit (1);
|
||||
@@ -100,7 +100,7 @@ int main (int argc, char **argv)
|
||||
Prog, sgr_dbname ());
|
||||
fail_exit (5);
|
||||
}
|
||||
gshadow_locked = true;
|
||||
sgr_locked = true;
|
||||
if (sgr_open (O_CREAT | O_RDWR) == 0) {
|
||||
fprintf (stderr, _("%s: cannot open %s\n"), Prog, sgr_dbname ());
|
||||
fail_exit (1);
|
||||
|
Reference in New Issue
Block a user