Bug 155402 - LDAP SASL/EXTERNAL requires ability to set empty conf values
LDAP SASL/EXTERNAL requires ability to set empty conf values
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: libuser (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-19 19:47 EDT by Aaron Hope
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: 0.53.6-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-25 03:54:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aaron Hope 2005-04-19 19:47:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2

Description of problem:
The LDAP SASL/EXTERNAL authentication mechanism appears to require that the authzid/authcid be empty.  Since the libuser configuration parsing ignores lines with empty values, there is no way to authenticate with the EXTERNAL mechanism (e.g. SSL client certs or PF_UNIX peer credentials).  Ideally, it would be possible to specify the SASL mechanism in /etc/libuser.conf and behave appropriately, as the openldap utilities do.  At the least, it should be possible to specify an empty string for configuration values, either as an empty quoted string or by the absense of any value.

Our site currently uses custom-built rpm with the following patch:

diff -ru libuser-0.52.5/lib/config.c libuser-0.52.5.mod/lib/config.c
--- libuser-0.52.5/lib/config.c 2004-09-02 14:56:36.000000000 -0400
+++ libuser-0.52.5.mod/lib/config.c     2005-03-29 18:55:41.000000000 -0500
@@ -249,7 +249,7 @@

                /* If we have a valid line, */
                if (section && k && value &&
-                   strlen(section) && strlen(k) && strlen(value)) {
+                   strlen(section) && strlen(k)) {
                        /* format the section and key as a path and if the
                         * result matches the requested key, */
                        tmp = g_strconcat(section, "/", k, NULL);


Version-Release number of selected component (if applicable):
libuser-0.52.5-1, CVS as of 2005-04-19

How reproducible:
Always

Steps to Reproduce:
1. Configure slapd for root peercred auth:
sasl-regexp     uidNumber=0\\+gidNumber=.*,cn=peercred,cn=external,cn=auth
                my_local_rootdn
# Minimum security strength for authentication. ldapi:// ssf is 71
sasl-secprops   minssf=71

2. Add "SASL_MECH EXTERNAL" to ~/.ldaprc
3. Add "user =" to /etc/libuser.conf

  

Actual Results:  libuser utilities (lchage -l) fail to authenticate

Expected Results:  invalid entries in /etc/libuser.conf should generate warnings and there needs to be some way of overriding default values with empty strings.

Additional info:
Comment 1 Miloslav Trmač 2005-04-25 03:54:21 EDT
Thanks, applied in rawhide libuser-0.53.6-1.

Unfortunately warnings about invalid config file are not really practical:
- for passwd and usermode the warnings should go to syslog; the user
  invoking passwd usually can't fix /etc/libuser.conf
- when libuser is used by non-root users (with custom config or when
  running the libuser testsuite), the messages should go to stderr
  because root doesn't care and the user using libuser can't get the
  syslog messages
- the natural place to choose the logging system is the config file :)

The libuser interface could be extended to allow the application to choose
(silent/stderr/syslog), but that won't fix the existing applications
linking with libuser.

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