* lib/utent.c (getutline): Remove getutline(). This function is
no more used. * lib/groupmem.c: Limit the scope of variable i. * lib/shadow.c: Avoid implicit conversion of pointers and integers to booleans. * lib/shadow.c: Added brackets. * libmisc/limits.c: Limit the scope of variable tmpmask. * libmisc/copydir.c: Close opened file on failure. * libmisc/loginprompt.c: Limit the scope of variable envc. * libmisc/find_new_uid.c, libmisc/find_new_gid.c: Limit the scope of variable id.
This commit is contained in:
@@ -507,7 +507,6 @@ static int setup_user_limits (const char *uname)
|
||||
static void setup_usergroups (const struct passwd *info)
|
||||
{
|
||||
const struct group *grp;
|
||||
mode_t tmpmask;
|
||||
|
||||
/*
|
||||
* if not root, and UID == GID, and username is the same as primary
|
||||
@@ -519,6 +518,7 @@ static void setup_usergroups (const struct passwd *info)
|
||||
grp = getgrgid (info->pw_gid);
|
||||
if ( (NULL != grp)
|
||||
&& (strcmp (info->pw_name, grp->gr_name) == 0)) {
|
||||
mode_t tmpmask;
|
||||
tmpmask = umask (0777);
|
||||
tmpmask = (tmpmask & ~070) | ((tmpmask >> 3) & 070);
|
||||
(void) umask (tmpmask);
|
||||
|
||||
Reference in New Issue
Block a user