This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 684789 - CVS PAM authentication does not support RHOST item
CVS PAM authentication does not support RHOST item
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cvs (Show other bugs)
6.1
All Linux
medium Severity medium
: rc
: ---
Assigned To: Petr Pisar
Tomas Dolezal
: FutureFeature, Patch
: 858692 (view as bug list)
Depends On:
Blocks: 947781
  Show dependency treegraph
 
Reported: 2011-03-14 09:58 EDT by Petr Pisar
Modified: 2013-11-21 01:07 EST (History)
7 users (show)

See Also:
Fixed In Version: cvs-1.11.23-16.el6
Doc Type: Enhancement
Doc Text:
Feature: CVS server should pass client's IP address to Pluggable Athentication Module (PAM) system. Reason: PAM allows to discriminate users according to their network address. To use this feature, CVS server has to set the remote address. Result (if any): CVS server has been patched to retrieve client's network address and pass it the the PAM. Also the server has been patched to set PAM_TTY variable to a dummy value `cvs' because some PAM modules expect the value has a defined value.
Story Points: ---
Clone Of: cvs-pam-rhost
Environment:
Last Closed: 2013-11-21 01:07:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix backported from upstream development version (3.14 KB, patch)
2011-03-14 10:01 EDT, Petr Pisar
no flags Details | Diff

  None (edit)
Description Petr Pisar 2011-03-14 09:58:52 EDT
+++ This bug was initially created as a clone of Bug #538376 +++

Created attachment 370065 [details]
Patch to include RHOST attribute to PAM if 'REMOTE_HOST' is available in environment.

Description of problem:
I have an environment where a CVS server is exposed to two classes of networks. One of the classes ("external") should use an anonymous, read-only view of the CVS tree, while another class ("internal") should use a per-user verification and a read-write view. It is important to our environment that no modifications  can done performed from the external view -- even if the user is in possession of a valid username and password.

This type of verification is available using PAM listfile authentication on its 'rhost' attribute, but the cvs server does not include this attribute (even though the information is readily available as xinetd is exporting the 'REMOTE_HOST' into the environment) in the calls to PAM.

I am attaching a patch to supply the RHOST data to the cvs package in the hopes of not having to manually add the patch and rebuild the cvs package in the future.

I'm running this patch in production, limiting PAM authentication to the hosts listed in /etc/cvswritehosts using the following directive in the /etc/pam.d/cvs file:

---
auth		required	pam_listfile.so \
					item=rhost sense=allow onerr=fail file=/etc/cvswritehosts
---

Anonymous access is provided through a no-password entry in the CVS 'passwd' file in CVSROOT.

Version-Release number of selected component (if applicable):
Currently running patched version of 1.11.22-5.

Steps to Reproduce:
N/A
  
Actual results:
PAM listfile item 'rhost' does not work with CVS in pserver mode.

Expected results:
PAM listfile item 'rhost' works with CVS in pserver mode.

--- Additional comment from ppisar@redhat.com on 2011-03-14 13:20:49 GMT ---

Created attachment 484179 [details]
Fix backported from upstream development version

This patch passes PAM_RHOST and PAM_TTY to PAM subsystem. The value is obtained from standard input descriptor.

This way is more generic than former patch relying to environment.

----

This is new feature missing in RHEL-6 too. As it will be back-ported into RHEL-5, we need in in RHEL-6 too.
Comment 1 Petr Pisar 2011-03-14 10:01:15 EDT
Created attachment 484192 [details]
Fix backported from upstream development version

This patch passes PAM_RHOST and PAM_TTY to PAM subsystem. The value is obtained
from standard input descriptor.

This way is more generic than former patch relying to environment.
Comment 2 RHEL Product and Program Management 2011-07-05 19:52:47 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 5 Suzanne Yeghiayan 2012-01-31 16:18:18 EST
This request was evaluated by Red Hat Product Management for inclusion in the
current release of Red Hat Enterprise Linux. Because the affected component is
not scheduled to be updated in the current release, Red Hat is unfortunately
unable to address this request at this time.  It has been proposed for the next
release. If you would like it considered as an exception in the current
release, please ask your support representative.
Comment 6 Tomas Dolezal 2012-09-19 08:49:09 EDT
*** Bug 858692 has been marked as a duplicate of this bug. ***
Comment 18 errata-xmlrpc 2013-11-21 01:07:58 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1555.html

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