Bug 68569 - su doesn't do the right checks before calling chdir()
Summary: su doesn't do the right checks before calling chdir()
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sh-utils
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-11 10:14 UTC by Johnny Mnemonic
Modified: 2007-04-18 16:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-04 20:31:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Johnny Mnemonic 2002-07-11 10:14:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020605

Description of problem:
The strace output for su - user is quite self-explanatory:

time(NULL)                              = 1026381455
setfsuid32(0x321)                       = 0
chdir("/home/web/someuser")              = -1 EACCES (Permission denied)

the problem is that "web" has a 750 permission and is owned by root.
SU should actually call setfsgid() before doing that chdir() call, cause my
setup is legal. (in fact it gives an error but then you can happily cd ~ and do
your stuff.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. see the description, most information is there
2. give read permission to a homedirectory only to the user's group
3. su - that user
	

Additional info:

Comment 1 Bernhard Rosenkraenzer 2002-08-29 19:08:21 UTC
Fixed in 2.0.12-2

Comment 2 Bill Nottingham 2006-08-04 20:31:32 UTC
Red Hat Linux and Red Hat Powertools are currently no longer supported by Red
Hat, Inc. In an effort to clean up bugzilla, we are closing all bugs in MODIFIED
state for these products.

However, we do want to make sure that nothing important slips through the
cracks. If, in fact, these issues are not resolved in a current Fedora Core
Release (such as Fedora Core 5), please open a new issues stating so. Thanks.


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