diff options
author | jkh <jkh@FreeBSD.org> | 1999-04-27 07:09:18 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-04-27 07:09:18 +0000 |
commit | aba5e776bb95610ea3e3355cbf47aadb844773eb (patch) | |
tree | f694a1be41be9a102fed7c6f8993388aa612b95b /usr.sbin/lpr/common_source/net.c | |
parent | d3809450efbb1bc19acc8a7c487c2fe2b536e366 (diff) | |
download | FreeBSD-src-aba5e776bb95610ea3e3355cbf47aadb844773eb.zip FreeBSD-src-aba5e776bb95610ea3e3355cbf47aadb844773eb.tar.gz |
lpd tries to be clever and checks if RM == my_hostname.
However, it doesn't check if the remote printer name it
is sending it to is the same as the local printer name,
and so chokes 'cos "laser" is not a real printer.
PR: 7081
Submitted by: David Malone <dwmalone@maths.tcd.ie>
Diffstat (limited to 'usr.sbin/lpr/common_source/net.c')
-rw-r--r-- | usr.sbin/lpr/common_source/net.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/lpr/common_source/net.c b/usr.sbin/lpr/common_source/net.c index d5886f9..05c8085 100644 --- a/usr.sbin/lpr/common_source/net.c +++ b/usr.sbin/lpr/common_source/net.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: net.c,v 1.1 1997/12/02 20:45:22 wollman Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -160,6 +160,11 @@ checkremote(struct printer *pp) struct in_addr *localaddrs; int i, j, nlocaladdrs, ncommonaddrs; + if (!pp->rp_matches_local) { /* Remote printer doesn't match local */ + pp->remote = 1; + return NULL; + } + pp->remote = 0; /* assume printer is local */ if (pp->remote_host != NULL) { /* get the addresses of the local host */ |