Access control is now done only using hosts.lpd.
See lpd(8) for more information about the format of this file.
"seems reasonable" tedu@
"looks good" deraadt@
ok sthen@
-/* $OpenBSD: pathnames.h,v 1.4 2003/06/02 23:36:53 millert Exp $ */
+/* $OpenBSD: pathnames.h,v 1.5 2014/04/20 22:35:10 ajacoutot Exp $ */
/* $NetBSD: pathnames.h,v 1.5 1995/11/28 19:43:27 jtc Exp $ */
/*
#define _PATH_DEFDEVLP "/dev/lp"
#define _PATH_DEFSPOOL "/var/spool/output/lpd"
-#define _PATH_HOSTSEQUIV "/etc/hosts.equiv"
#define _PATH_HOSTSLPD "/etc/hosts.lpd"
#define _PATH_MASTERLOCK "/var/run/lpd.pid"
#define _PATH_PR "/usr/bin/pr"
-.\" $OpenBSD: lpd.8,v 1.25 2014/04/20 18:11:45 tedu Exp $
+.\" $OpenBSD: lpd.8,v 1.26 2014/04/20 22:35:10 ajacoutot Exp $
.\" $NetBSD: lpd.8,v 1.23 2002/02/08 01:38:50 ross Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.Pp
Access control is provided by two means.
First, all requests must come from one of the machines listed in the file
-.Pa /etc/hosts.lpd
-or
-.Pa /etc/hosts.equiv ,
+.Pa /etc/hosts.lpd ,
one hostname per line.
A plus "+" may be used as a wildcard to grant access to all hosts.
Second, if the
line printer devices
.It Pa /var/run/printer
socket for local requests
-.It Pa /etc/hosts.equiv
-lists machine names allowed printer access
.It Pa /etc/hosts.lpd
-lists machine names allowed printer access,
-but not under same administrative control.
+lists machine names allowed printer access
.El
.Sh SEE ALSO
.Xr lpq 1 ,
-/* $OpenBSD: lpd.c,v 1.52 2013/11/24 21:32:32 deraadt Exp $ */
+/* $OpenBSD: lpd.c,v 1.53 2014/04/20 22:35:10 ajacoutot Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
{
struct addrinfo hints, *res, *r;
FILE *hostf;
- int first = 1;
int good = 0;
char host[NI_MAXHOST], ip[NI_MAXHOST];
char serv[NI_MAXSERV];
fatal("address for your hostname (%s) not matched", host);
setproctitle("serving %s", from);
PRIV_START;
- hostf = fopen(_PATH_HOSTSEQUIV, "r");
+ hostf = fopen(_PATH_HOSTSLPD, "r");
PRIV_END;
-again:
if (hostf) {
if (__ivaliduser_sa(hostf, f, f->sa_len, DUMMY, DUMMY) == 0) {
(void)fclose(hostf);
}
(void)fclose(hostf);
}
- if (first == 1) {
- first = 0;
- PRIV_START;
- hostf = fopen(_PATH_HOSTSLPD, "r");
- PRIV_END;
- goto again;
- }
fatal("Your host does not have line printer access");
- /*NOTREACHED*/
}
static __dead void