Bug 16346 - lpr can't print read-protected user's files
Summary: lpr can't print read-protected user's files
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: LPRng   
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-16 14:41 UTC by Horst H. von Brand
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

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: ---


Attachments (Terms of Use)

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


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