aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/common_source/common.c9
-rw-r--r--usr.sbin/lpr/common_source/printcap.c4
-rw-r--r--usr.sbin/lpr/lpc/lpc.84
-rw-r--r--usr.sbin/lpr/lpd/lpd.82
-rw-r--r--usr.sbin/lpr/lpd/lpd.c1
-rw-r--r--usr.sbin/lpr/lpr/lpr.c11
6 files changed, 25 insertions, 6 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index d7b97cd429d1..0fe755dec16f 100644
--- a/usr.sbin/lpr/common_source/common.c
+++ b/usr.sbin/lpr/common_source/common.c
@@ -1,4 +1,13 @@
/*
+ * Copyright (c) UNIX System Laboratories, Inc. All or some portions
+ * of this file are derived from material licensed to the
+ * University of California by American Telephone and Telegraph Co.
+ * or UNIX System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * $Id: common.c,v 1.1.1.1.2.1 1994/05/04 08:01:55 rgrimes Exp $
+ */
+/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
diff --git a/usr.sbin/lpr/common_source/printcap.c b/usr.sbin/lpr/common_source/printcap.c
index 47b1b80c49dd..0cdbef9ec678 100644
--- a/usr.sbin/lpr/common_source/printcap.c
+++ b/usr.sbin/lpr/common_source/printcap.c
@@ -76,9 +76,9 @@ static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91";
static FILE *pfp = NULL; /* printcap data base file pointer */
static char *tbuf;
static int hopcount; /* detect infinite loops in termcap, init 0 */
-char *tskip();
+static char *tskip();
char *tgetstr();
-char *tdecode();
+static char *tdecode();
char *getenv();
/*
diff --git a/usr.sbin/lpr/lpc/lpc.8 b/usr.sbin/lpr/lpc/lpc.8
index f69169ac4e0f..9d4a41c64af6 100644
--- a/usr.sbin/lpr/lpc/lpc.8
+++ b/usr.sbin/lpr/lpc/lpc.8
@@ -73,7 +73,7 @@ arguments as parameters to the command. The standard input
may be redirected causing
.Nm lpc
to read commands from file.
-Commands may be abreviated;
+Commands may be abbreviated;
the following is the list of recognized commands.
.Pp
.Bl -tag -width Ds -compact
@@ -161,7 +161,7 @@ lock file for queue control
.Sh DIAGNOSTICS
.Bl -tag -width Ds
.It Sy "?Ambiguous command"
-abreviation matches more than one command
+abbreviation matches more than one command
.It Sy "?Invalid command"
no match was found
.It Sy "?Privileged command"
diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8
index e4a96dd661ce..edb2c025dda5 100644
--- a/usr.sbin/lpr/lpd/lpd.8
+++ b/usr.sbin/lpr/lpd/lpd.8
@@ -100,7 +100,7 @@ file can be edited with your favorite text editor.
.Pp
The daemon begins processing files
after it has successfully set the lock for exclusive
-access (descibed a bit later),
+access (described a bit later),
and scans the spool directory
for files beginning with
.Em cf .
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index edfda933296c..844316797c75 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -174,6 +174,7 @@ main(argc, argv)
syslog(LOG_ERR, "printer/tcp: unknown service");
mcleanup();
}
+ sin.sin_addr.s_addr=INADDR_ANY;
sin.sin_family = AF_INET;
sin.sin_port = sp->s_port;
if (bind(finet, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index f8133db5373b..eca1fb43e2db 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -1,4 +1,13 @@
/*
+ * Copyright (c) UNIX System Laboratories, Inc. All or some portions
+ * of this file are derived from material licensed to the
+ * University of California by American Telephone and Telegraph Co.
+ * or UNIX System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * $Id: lpr.c,v 1.1.1.1.2.2 1994/05/04 08:02:12 rgrimes Exp $
+ */
+/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
@@ -483,7 +492,7 @@ nfile(n)
register f;
int oldumask = umask(0); /* should block signals */
- f = creat(n, FILMOD);
+ f = open(n, O_WRONLY|O_EXCL|O_CREAT, FILMOD);
(void) umask(oldumask);
if (f < 0) {
printf("%s: cannot create %s\n", name, n);