Bug 218024 - rsh/rlogin ignore pam_env module environment
Summary: rsh/rlogin ignore pam_env module environment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rsh
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-01 12:12 UTC by Tomasz Kepczynski
Modified: 2013-04-30 23:34 UTC (History)
2 users (show)

Fixed In Version: rsh-0.17-38.fc6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-13 10:08:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test package (116.00 KB, application/octet-stream)
2006-12-05 13:27 UTC, Adam Tkac
no flags Details
added options from pam_env to environment (742 bytes, patch)
2006-12-13 10:02 UTC, Adam Tkac
no flags Details | Diff

Description Tomasz Kepczynski 2006-12-01 12:12:03 UTC
Description of problem:
Both rlogin and rsh do not get environment established by
pam_env module by pam_getenvlist and do not pass it to
executed process.
For rlogin the problem is hidden by the fact that in.rlogind
calls login binary itself which in turn may do the right thing.

Version-Release number of selected component (if applicable):
rsh-0.17-37.fc6.i386
rsh-server-0.17-37.fc6.i386


How reproducible:
always

Actual results:
rsh session does not have environment configured
by pam_env. This may also apply to rlogin.

Expected results:
Session has environment set by pam_env.

Comment 1 Adam Tkac 2006-12-05 13:27:27 UTC
Created attachment 142839 [details]
test package

Could you please test this package and send me your results? I think, problem
is fixed now. Thanks much

Comment 2 Tomasz Kepczynski 2006-12-08 08:44:27 UTC
This does not work. The problem is that you set environment
in doauth function, and later on environment is overwriteen
in doit function by assignement:
        environ = envinit;
Shouldn't we also move what's contained in envinit to
properly configured pam_env.conf???

Now for the rlogin. It seems to work but probably only
because in.rlogind always calls login which properly sets
environment. The problem however is that current configuration
in /etc/pam.d/rlogin causes pam_env to be called twice. Once
by in.rlogind and for the second time by login program. This
means that unexpectedly we may end up with variables set
by OVERRIDE clause in pam_env.conf and not DEFAULT. I guess
/etc/pam.d/rlogin should not execute pam_env as it is going
to be done by login program anyway.


Comment 3 Adam Tkac 2006-12-13 10:02:48 UTC
Created attachment 143501 [details]
added options from pam_env to environment

Oh, I didn't see that rsh overwrite environ. Now it works correctly. Updated
package will be avaliable through update tomorrow


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