Bug 16346

Summary: lpr can't print read-protected user's files
Product: [Retired] Red Hat Linux Reporter: Horst H. von Brand <vonbrand>
Component: LPRngAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-08-16 16:00:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Horst H. von Brand 2000-08-16 14:41:08 UTC
lpr is installed SUID lp, group lp, which means it can't read user's files
to print them if they aren't world-readable.

Comment 1 Tim Waugh 2000-08-16 15:07:38 UTC
It works for me.  Are you having trouble printing a read-protected file?

Comment 2 mal 2000-08-16 15:56:03 UTC
Is u+s really needed?
I tried lpr after
chmod u-s /usr/bin/lpr
it prints OK even without this bit.
what was the purpouse of making u+s bit set?

Comment 3 mal 2000-08-16 16:00:49 UTC
Forgot to tell.
It does not print with u+s bit set:

ls -l O1 
-rw-------    1 mal      mal            12 Aug 16 07:59 O1

lpr O1
Warning - Cannot open file 'O1', Permission denied
lp: nothing to print

after 
chmod u-s /usr/bin/lpr

it prints OK.


Comment 4 Tim Waugh 2000-08-16 16:03:01 UTC
That explains it: I'm using the LPRng from our current build, which does not
have the setuid bit set.

Comment 5 mal 2000-08-16 16:14:19 UTC
The bit (u-s) should also be removed from all others
programs form LPRng package