summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/lpr/lpr/lpr.14
-rw-r--r--usr.sbin/lpr/lpr/lpr.c13
2 files changed, 3 insertions, 14 deletions
diff --git a/usr.sbin/lpr/lpr/lpr.1 b/usr.sbin/lpr/lpr/lpr.1
index 32dd50713ea..561e5aad663 100644
--- a/usr.sbin/lpr/lpr/lpr.1
+++ b/usr.sbin/lpr/lpr/lpr.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: lpr.1,v 1.6 2003/03/27 23:45:14 millert Exp $
+.\" $OpenBSD: lpr.1,v 1.7 2003/05/19 00:33:23 pjanzen Exp $
.\" $NetBSD: lpr.1,v 1.10 2002/01/19 03:23:26 wiz Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
@@ -255,8 +255,6 @@ files
.El
.Sh DIAGNOSTICS
If you try to spool too large a file, it will be truncated.
-.Nm lpr
-will object to printing binary files.
If a user other than root prints a file and spooling is disabled,
.Nm
will print a message saying so and will not put jobs in the queue.
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index 238f193e109..2abd4f28eb9 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpr.c,v 1.32 2003/03/27 23:45:14 millert Exp $ */
+/* $OpenBSD: lpr.c,v 1.33 2003/05/19 00:33:23 pjanzen 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.32 2003/03/27 23:45:14 millert Exp $";
+static const char rcsid[] = "$OpenBSD: lpr.c,v 1.33 2003/05/19 00:33:23 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -68,7 +68,6 @@ static const char rcsid[] = "$OpenBSD: lpr.c,v 1.32 2003/03/27 23:45:14 millert
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <a.out.h>
#include <signal.h>
#include <syslog.h>
#include <pwd.h>
@@ -580,7 +579,6 @@ cleanup(int signo)
static int
test(char *file)
{
- struct exec execb;
int fd;
char *cp;
@@ -604,13 +602,6 @@ test(char *file)
warnx("%s is an empty file", file);
goto bad;
}
- if (read(fd, &execb, sizeof(execb)) == sizeof(execb) &&
- !N_BADMAG(execb)) {
- warnx("%s is an executable program and is unprintable",
- file);
- (void)close(fd);
- goto bad;
- }
(void)close(fd);
if (rflag) {
if ((cp = strrchr(file, '/')) == NULL) {