Bug 218024 - rsh/rlogin ignore pam_env module environment
rsh/rlogin ignore pam_env module environment
Product: Fedora
Classification: Fedora
Component: rsh (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Tkac
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-12-01 07:12 EST by Tomasz Kepczynski
Modified: 2013-04-30 19:34 EDT (History)
2 users (show)

See Also:
Fixed In Version: rsh-0.17-38.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-13 05:08:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Tomasz Kepczynski 2006-12-01 07:12:03 EST
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):

How reproducible:

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 08:27:27 EST
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 03:44:27 EST
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 05:02:48 EST
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.