From kde-commits Sun Jan 04 10:16:25 2009 From: Oswald Buddenhagen Date: Sun, 04 Jan 2009 10:16:25 +0000 To: kde-commits Subject: KDE/kdebase/workspace/kdm/backend Message-Id: <1231064185.641014.10267.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=123106419423220 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: