lpq.c (216372) | lpq.c (241852) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 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: --- 27 unchanged lines hidden (view full) --- 36 37#if 0 38#ifndef lint 39static char sccsid[] = "@(#)lpq.c 8.3 (Berkeley) 5/10/95"; 40#endif /* not lint */ 41#endif 42 43#include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ | 1/* 2 * Copyright (c) 1983, 1993 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: --- 27 unchanged lines hidden (view full) --- 36 37#if 0 38#ifndef lint 39static char sccsid[] = "@(#)lpq.c 8.3 (Berkeley) 5/10/95"; 40#endif /* not lint */ 41#endif 42 43#include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ |
44__FBSDID("$FreeBSD: head/usr.sbin/lpr/lpq/lpq.c 216372 2010-12-11 09:38:12Z joel $"); | 44__FBSDID("$FreeBSD: head/usr.sbin/lpr/lpq/lpq.c 241852 2012-10-22 03:31:22Z eadler $"); |
45 46/* 47 * Spool Queue examination program 48 * 49 * lpq [-a] [-l] [-Pprinter] [user...] [job...] 50 * 51 * -a show all non-null queues on the local machine 52 * -l long output --- 30 unchanged lines hidden (view full) --- 83{ 84 int ch, aflag, lflag; 85 const char *printer; 86 struct printer myprinter, *pp = &myprinter; 87 88 printer = NULL; 89 euid = geteuid(); 90 uid = getuid(); | 45 46/* 47 * Spool Queue examination program 48 * 49 * lpq [-a] [-l] [-Pprinter] [user...] [job...] 50 * 51 * -a show all non-null queues on the local machine 52 * -l long output --- 30 unchanged lines hidden (view full) --- 83{ 84 int ch, aflag, lflag; 85 const char *printer; 86 struct printer myprinter, *pp = &myprinter; 87 88 printer = NULL; 89 euid = geteuid(); 90 uid = getuid(); |
91 seteuid(uid); | 91 PRIV_END |
92 progname = *argv; 93 if (gethostname(local_host, sizeof(local_host))) 94 err(1, "gethostname"); 95 openlog("lpd", 0, LOG_LPR); 96 97 aflag = lflag = 0; 98 while ((ch = getopt(argc, argv, "alP:")) != -1) 99 switch((char)ch) { --- 96 unchanged lines hidden --- | 92 progname = *argv; 93 if (gethostname(local_host, sizeof(local_host))) 94 err(1, "gethostname"); 95 openlog("lpd", 0, LOG_LPR); 96 97 aflag = lflag = 0; 98 while ((ch = getopt(argc, argv, "alP:")) != -1) 99 switch((char)ch) { --- 96 unchanged lines hidden --- |