Bug 218024

Summary: rsh/rlogin ignore pam_env module environment
Product: [Fedora] Fedora Reporter: Tomasz Kepczynski <tomek>
Component: rshAssignee: Adam Tkac <atkac>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: kzak, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rsh-0.17-38.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-13 10:08:29 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:
Attachments:
Description Flags
test package
none
added options from pam_env to environment none

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