Bug 16346 - lpr can't print read-protected user's files
lpr can't print read-protected user's files
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: LPRng (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-16 10:41 EDT by Horst H. von Brand
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-08-16 12:00:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Horst H. von Brand 2000-08-16 10:41:08 EDT
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 11:07:38 EDT
It works for me.  Are you having trouble printing a read-protected file?
Comment 2 mal 2000-08-16 11:56:03 EDT
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 12:00:49 EDT
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 12:03:01 EDT
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 12:14:19 EDT
The bit (u-s) should also be removed from all others
programs form LPRng package

Note You need to log in before you can comment on or make changes to this bug.