summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2000-01-24 23:30:38 +0000
committerdillon <dillon@FreeBSD.org>2000-01-24 23:30:38 +0000
commit1a88679ae1b5d8f8d777508cfcb671d512e56bce (patch)
tree667ae5873e03717b63dd3dbf9496f798ea4f88ea /usr.sbin/lpr
parent6b7275814f602396b5f8d9ed2bbc0ebd70db50fe (diff)
downloadFreeBSD-src-1a88679ae1b5d8f8d777508cfcb671d512e56bce.zip
FreeBSD-src-1a88679ae1b5d8f8d777508cfcb671d512e56bce.tar.gz
'start' command was not reenabling printing.
PR: bin/15728
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/lpc/cmds.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index 5fa5eab..1ed69c8 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -587,12 +587,13 @@ startpr(pp, enable)
printf("%s:\n", pp->printer);
/*
- * Turn off the owner execute bit of the lock file to enable printing.
+ * For enable==1 ('start'), turn off the LFM_PRINT_DIS bit of the
+ * lock file to re-enable printing. For enable==2 ('up'), also
+ * turn off the LFM_QUEUE_DIS bit to re-enable queueing.
*/
seteuid(euid);
if (enable && stat(lf, &stbuf) >= 0) {
- mode_t bits = (enable == 2 ? 0
- : (LFM_PRINT_DIS | LFM_QUEUE_DIS));
+ mode_t bits = (enable == 2 ? 0 : LFM_QUEUE_DIS);
if (chmod(lf, stbuf.st_mode & (LOCK_FILE_MODE | bits)) < 0)
printf("\tcannot enable printing\n");
else
OpenPOWER on IntegriCloud