"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, answerguy@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?) 'lpd' Bug: "restricted service" option; Hangs Printer Daemon

From Michael Martinez on Thu, 24 Dec 1998

(?) The lpd that RedHat linux supplies has a problem. If you send it a print job across the network, and you do not have an account on the print serve, lpd forks a child, creates an entry for you in the queue, then hangs because it can't find your user id. Do you know a remedy for this?

Michael Martinez
System Administrator, C.S. Dept, New Mexico Tech

(!) I think I read about this in the security mailing lists recently. It seems to be related to the "restricted service" (rs) option in your /etc/printcap.
One option would be to remove the rs option from the printcap and use packet filtering and hosts_access (TCP_Wrappers) to restrict access to your print server(s).
Then look for updates to the packqage itself.
The first thing to do is to report this to Red Hat Inc. after checking their web site and for any updates to this package. First find the package name using rpm -q /usr/sbin/lpd. This will tell you which RPM package included the lpd command.
Then connect to ftp://updates.redhat.com (or one of its mirror sites). I don't see one there yet. If you aren't already using the most current Red Hat version (5.2 at this point) then check for that package in the RPMS directory for the latest. Red Hat Inc normally embeds the version in the package and file names.
My S.u.S.E. system (which uses RPM format but uses a different suite of RPM files) reports lprold-3.0.1-14 as the package name that owns '/bin/sbin/lpd' --- so I'd look for a S.u.S.E. RPM that was later than that.
Failing that look for a Debian package (an update) and try using "alien" to convert that into an RPM. Look up the Debian maintainer for that package at the http://www.debian.org web site.
If that doesn't work, look for a canonical "home" site for the package (lpr/lpd is a classic BSD subsystem --- so looking at the FreeBSD NetBSD and/or OpenBSD sites for a later version of the "tarball" (sources in .tar format) might work. Look in the man pages and run 'strings' on the lpd binary --- and look through other docs (use rpm -ql <packagename> for a list of all files in that package) to see if an author or maintainer for the base package is listed. Then you can look at that maintainer's web site or FTP server, and/or possibly e-mail them.
(The BSD sites are http://www.freebsd.org, http://www.netbsd.org, http://www.openbsd.org, in case you needed them.)
If you have a competent programmer on hand (I'm am not a competent programmer) you could have them look through the sources and apply a fix. Then you'd e-mail the diffs to your patches to the maintainer of the package (possibly copying Red Hat Inc as well). If you also looked at the Debian site for an update you can copy their maintainer on your fix as well.
They may not accept your patches --- but they will certainly appreciate the effort and it may help them focus on the right part of the code.
This is how Linux got where it is today. (I've sent patches in on 'sendmail', 'md5sum' and 'tripwire' in the past --- and I'm not a programmer. So anyone who does feel competent in the art should not be intimidated by the notion, and won't have to spend nearly as long poring over the sources as I did for my pathetic little suggestions).
I'd like to suggest one modest "New Year's Resolution" to every Linux user:
Find one bug or typo. Fix it.
... hunt through the man pages, docs, sources, etc of a few of your favorite packages. Find one thing that's wrong or missing, correct it (or find someone to do it with you) and submit the patch to the appropriate parties.
Last year was the first year Linux was taken "seriously." Let's make this the year that we prove that the "open source" (TM) process is maintainable and yields truly superior and mature results.

(?) LPD forks and hangs/Linux

From Michael Martinez on Sat, 26 Dec 1998

Thanks a bunch for your great, documented help. Just so you know, RH 5.2 ships with this problem. So, I'll check out the other resources you gave me. I've considered writing a patch for it - I might just do it!

Merry Christmas,

Michael Martinez
System Administrator, C.S. Dept, New Mexico Tech


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 36 January 1999


[ Answer Guy Index ] a b c 1 2 3 4 5 6 7 9 10 11 12
15 16 18 19 20 21 22 23 24 25 26 27 28
29 31 32 33 34 35 36 37 38 39 40 41 42 44
45 46 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66
67 69 72 76 77 78 79 80 81 82 84 85 86 87 91 94 95 96 97 98


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]