mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Eliminate global variables.
There is no reason why these three variables should be declared as global variables, while the others aren't. They are only used inside main().
This commit is contained in:
parent
acd29a915f
commit
4c46bfb6dc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227223
@ -56,16 +56,12 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
static void usage(void);
|
||||
|
||||
char *user; /* user to switch to before running program */
|
||||
char *group; /* group to switch to ... */
|
||||
char *grouplist; /* group list to switch to ... */
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct group *gp;
|
||||
struct passwd *pw;
|
||||
char *endp, *p;
|
||||
char *endp, *p, *user, *group, *grouplist;
|
||||
const char *shell;
|
||||
gid_t gid, *gidlist;
|
||||
uid_t uid;
|
||||
@ -74,6 +70,7 @@ main(int argc, char *argv[])
|
||||
|
||||
gid = 0;
|
||||
uid = 0;
|
||||
user = group = grouplist = NULL;
|
||||
while ((ch = getopt(argc, argv, "G:g:u:")) != -1) {
|
||||
switch(ch) {
|
||||
case 'u':
|
||||
|
Loading…
Reference in New Issue
Block a user