Deleted Added
full compact
lpd.c (79735) lpd.c (79739)
1/*
2 * Copyright (c) 1983, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 29 unchanged lines hidden (view full) ---

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
44#endif
45static const char rcsid[] =
1/*
2 * Copyright (c) 1983, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 29 unchanged lines hidden (view full) ---

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
44#endif
45static const char rcsid[] =
46 "$FreeBSD: head/usr.sbin/lpr/lpd/lpd.c 79735 2001-07-14 21:49:17Z gad $";
46 "$FreeBSD: head/usr.sbin/lpr/lpd/lpd.c 79739 2001-07-15 00:09:46Z gad $";
47#endif /* not lint */
48
49/*
50 * lpd -- line printer daemon.
51 *
52 * Listen for a connection and perform the requested operation.
53 * Operations are:
54 * \1printer\n

--- 55 unchanged lines hidden (view full) ---

110int main(int argc, char **_argv);
111static void reapchild(int _signo);
112static void mcleanup(int _signo);
113static void doit(void);
114static void startup(void);
115static void chkhost(struct sockaddr *_f, int _ch_opts);
116static int ckqueue(struct printer *_pp);
117static void fhosterr(int _dosys, const char *_sysmsg, const char *_usermsg,
47#endif /* not lint */
48
49/*
50 * lpd -- line printer daemon.
51 *
52 * Listen for a connection and perform the requested operation.
53 * Operations are:
54 * \1printer\n

--- 55 unchanged lines hidden (view full) ---

110int main(int argc, char **_argv);
111static void reapchild(int _signo);
112static void mcleanup(int _signo);
113static void doit(void);
114static void startup(void);
115static void chkhost(struct sockaddr *_f, int _ch_opts);
116static int ckqueue(struct printer *_pp);
117static void fhosterr(int _dosys, const char *_sysmsg, const char *_usermsg,
118 ...);
118 ...) __printf0like(3, 4);
119static int *socksetup(int _af, int _debuglvl);
120static void usage(void);
121
122/* XXX from libc/net/rcmd.c */
123extern int __ivaliduser_sa __P((FILE *, struct sockaddr *, socklen_t,
124 const char *, const char *));
125
126uid_t uid, euid;

--- 380 unchanged lines hidden (view full) ---

507 } else {
508 if (users >= MAXUSERS)
509 fatal(0, "Too many users");
510 user[users++] = cp;
511 }
512 }
513 status = getprintcap(printer, pp);
514 if (status < 0)
119static int *socksetup(int _af, int _debuglvl);
120static void usage(void);
121
122/* XXX from libc/net/rcmd.c */
123extern int __ivaliduser_sa __P((FILE *, struct sockaddr *, socklen_t,
124 const char *, const char *));
125
126uid_t uid, euid;

--- 380 unchanged lines hidden (view full) ---

507 } else {
508 if (users >= MAXUSERS)
509 fatal(0, "Too many users");
510 user[users++] = cp;
511 }
512 }
513 status = getprintcap(printer, pp);
514 if (status < 0)
515 fatal(pp, pcaperr(status));
515 fatal(pp, "%s", pcaperr(status));
516 displayq(pp, cbuf[0] == CMD_SHOWQ_LONG);
517 exit(0);
518 case CMD_RMJOB: /* remove a job from the queue */
519 if (!from_remote) {
520 syslog(LOG_INFO, "illegal request (%d)", *cp);
521 exit(1);
522 }
523 printer = cp;

--- 373 unchanged lines hidden ---
516 displayq(pp, cbuf[0] == CMD_SHOWQ_LONG);
517 exit(0);
518 case CMD_RMJOB: /* remove a job from the queue */
519 if (!from_remote) {
520 syslog(LOG_INFO, "illegal request (%d)", *cp);
521 exit(1);
522 }
523 printer = cp;

--- 373 unchanged lines hidden ---