diff options
author | gad <gad@FreeBSD.org> | 2001-10-09 00:27:14 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2001-10-09 00:27:14 +0000 |
commit | 051313964503ef90c6e63520f4ec896bd623d9e3 (patch) | |
tree | 2453932dbd6a420d25ed91bc4dfae776b687cf8e /usr.sbin | |
parent | 84784a2347f6d2056f0f0aee0798a587c0213f23 (diff) | |
download | FreeBSD-src-051313964503ef90c6e63520f4ec896bd623d9e3.zip FreeBSD-src-051313964503ef90c6e63520f4ec896bd623d9e3.tar.gz |
Rename the local variable 'person' to 'lpr_username', to avoid compile-time
warnings about conflict with a global variable used by 'lprm'.
MFC after: 4 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/lpr/lpr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c index 9610b18..23b3b8c 100644 --- a/usr.sbin/lpr/lpr/lpr.c +++ b/usr.sbin/lpr/lpr/lpr.c @@ -92,7 +92,7 @@ static const char *jobname; /* job name on header page */ static int mailflg; /* send mail */ static int nact; /* number of jobs to act on */ static int ncopies = 1; /* # of copies to make */ -static char *person; /* user name */ +static char *lpr_username; /* person sending the print job(s) */ static int qflag; /* q job, but don't exec daemon */ static int rflag; /* remove files upon completion */ static int sflag; /* symbolic link flag */ @@ -285,13 +285,13 @@ main(int argc, char *argv[]) if (Uflag) { if (userid != 0 && userid != pp->daemon_user) errx(1, "only privileged users may use the `-U' flag"); - person = Uflag; + lpr_username = Uflag; /* -U person doing 'lpr' */ } else { - person = getlogin(); - if (userid != pp->daemon_user || person == 0) { + lpr_username = getlogin(); /* person doing 'lpr' */ + if (userid != pp->daemon_user || lpr_username == 0) { if ((pw = getpwuid(userid)) == NULL) errx(1, "Who are you?"); - person = pw->pw_name; + lpr_username = pw->pw_name; } } @@ -303,7 +303,7 @@ main(int argc, char *argv[]) errx(1, "Restricted group specified incorrectly"); if (gptr->gr_gid != getgid()) { while (*gptr->gr_mem != NULL) { - if ((strcmp(person, *gptr->gr_mem)) == 0) + if ((strcmp(lpr_username, *gptr->gr_mem)) == 0) break; gptr->gr_mem++; } @@ -327,7 +327,7 @@ main(int argc, char *argv[]) /* owned by daemon for protection */ seteuid(uid); card('H', local_host); - card('P', person); + card('P', lpr_username); card('C', class); if (hdr && !pp->no_header) { if (jobname == NULL) { @@ -338,14 +338,14 @@ main(int argc, char *argv[]) ? arg + 1 : argv[0]); } card('J', jobname); - card('L', person); + card('L', lpr_username); } if (format != 'p' && Zflag != 0) card('Z', Zflag); if (iflag) card('I', itoa(indent)); if (mailflg) - card('M', person); + card('M', lpr_username); if (format == 't' || format == 'n' || format == 'd') for (i = 0; i < 4; i++) if (fonts[i] != NULL) |