[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/kdm/backend
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2009-01-04 10:16:25
Message-ID: 1231064185.641014.10267.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 905338 by ossi:

revert lubos' fix. see comment and
http://lists.kde.org/?l=kde-commits&m=123097618431063&w=2


 M  +16 -9     client.c  


--- trunk/KDE/kdebase/workspace/kdm/backend/client.c #905337:905338
@@ -402,15 +402,22 @@
 		pamh = 0;
 		V_RET;
 	}
-	/* normalize name (e.g. ldap removes whitespace) */
-	debug( " asking PAM for user ...\n" );
-	pam_get_item( pamh, PAM_USER, &pitem );
-	reInitErrorLog();
-	if( curuser )
-		free( curuser );
-	strDup( &curuser, (const char *)pitem );
-	gSendInt( V_PUT_USER );
-	gSendStr( curuser );
+	/*
+	 * Do not even *think* about making that unconditional.
+	 * If a module thinks it needs to normalize user names (hello LDAP),
+	 * feed it with normalized data in the first place and/or do some
+	 * final normalization in startClient(). If that turns out impossible,
+	 * the module needs an own conversation plugin which does not cause
+	 * curuser being set.
+	 */
+	if (!curuser) {
+		debug( " asking PAM for user ...\n" );
+		pam_get_item( pamh, PAM_USER, &pitem );
+		reInitErrorLog();
+		strDup( &curuser, (const char *)pitem );
+		gSendInt( V_PUT_USER );
+		gSendStr( curuser );
+	}
 	if (pretc != PAM_SUCCESS) {
 		switch (pretc) {
 		case PAM_USER_UNKNOWN:
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic