summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-03-08 23:28:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-03-08 23:28:16 +0000
commit1e54fe859568a01046ff1add8f4903b0fee5ecbf (patch)
treea78af13cbf332dcb6a994f333cdd466e7b00e9db
parentbecc9039f06dd4d76e89342ee124cd1046aa32ac (diff)
Honor the :sh: flag in the local printcap for remote printers too
instead of forcing the user to use lpr's "-h" flag. Adapted from a patch in FreeBSD from Scott James Remnant.
-rw-r--r--usr.sbin/lpr/lpr/lpr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index db333a36191..1350ce378d8 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpr.c,v 1.28 2002/06/19 01:24:14 deraadt Exp $ */
+/* $OpenBSD: lpr.c,v 1.29 2003/03/08 23:28:15 millert Exp $ */
/* $NetBSD: lpr.c,v 1.19 2000/10/11 20:23:52 is Exp $ */
/*
@@ -50,7 +50,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)lpr.c 8.4 (Berkeley) 4/28/95";
#else
-static const char rcsid[] = "$OpenBSD: lpr.c,v 1.28 2002/06/19 01:24:14 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: lpr.c,v 1.29 2003/03/08 23:28:15 millert Exp $";
#endif
#endif /* not lint */
@@ -297,7 +297,7 @@ main(int argc, char **argv)
tfd = nfile(tfname);
card('H', host);
card('P', person);
- if (hdr) {
+ if (hdr && !SH) {
if (jobname == NULL) {
if (argc == 0)
jobname = "stdin";
@@ -666,6 +666,7 @@ chkprinter(char *s)
if (cgetnum(bp, "du", &DU) < 0)
DU = DEFUID;
SC = (cgetcap(bp, "sc", ':') != NULL);
+ SH = (cgetcap(bp, "sh", ':') != NULL);
}
/*