aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorGarance A Drosehn <gad@FreeBSD.org>2001-10-09 00:27:14 +0000
committerGarance A Drosehn <gad@FreeBSD.org>2001-10-09 00:27:14 +0000
commitce89013afd32ffb1daca959bd745d2add86e9e7a (patch)
tree2453932dbd6a420d25ed91bc4dfae776b687cf8e /usr.sbin/lpr
parent572ce00d3e2f8306c524ec21c50efcb449344381 (diff)
downloadsrc-ce89013afd32ffb1daca959bd745d2add86e9e7a.tar.gz
src-ce89013afd32ffb1daca959bd745d2add86e9e7a.zip
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
Notes
Notes: svn path=/head/; revision=84695
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/lpr/lpr.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index 9610b1845744..23b3b8cc4fac 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)