diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c --- a/usr.sbin/lpr/lpr/lpr.c +++ b/usr.sbin/lpr/lpr/lpr.c @@ -68,7 +68,6 @@ #include #include -#include #include #include #include @@ -703,7 +702,6 @@ static int test(const char *file) { - struct exec execb; size_t dlen; int fd; char *cp, *dirpath; @@ -728,14 +726,6 @@ printf("%s: cannot open %s\n", progname, file); return(-1); } - /* - * XXX Shall we add a similar test for ELF? - */ - if (read(fd, &execb, sizeof(execb)) == sizeof(execb) && - !N_BADMAG(execb)) { - printf("%s: %s is an executable program", progname, file); - goto error1; - } (void) close(fd); if (rflag) { /* @@ -763,11 +753,6 @@ printf("%s: %s: is not removable by you\n", progname, file); } return(0); - -error1: - printf(" and is unprintable\n"); - (void) close(fd); - return(-1); } static int