diff options
| author | Luke Howard <lukeh@padl.com> | 2009-03-10 04:05:33 +0000 |
|---|---|---|
| committer | Luke Howard <lukeh@padl.com> | 2009-03-10 04:05:33 +0000 |
| commit | bf1796b7b05d9a304cfb50f13454460e5aab7ae6 (patch) | |
| tree | 426e9d664f7c7baf6331b2bad6b7decb62c135ff | |
| parent | 71bb1365c13eafc426f25d1c477a2e2c20c682ff (diff) | |
BUG#366: only request attributes actually used
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | pam_ldap.c | 16 |
2 files changed, 17 insertions, 1 deletions
@@ -6,6 +6,8 @@ $Id$ * fix for BUG#232: LDAP write on userPassword fails when chasing referral and cached policy error is POLICY_ERROR_PASSWORD_EXPIRED + * fix for BUG#366: only request attributes that are + actually used 184 Luke Howard <lukeh@padl.com> @@ -2670,6 +2670,20 @@ _escape_string (const char *str, char *buf, size_t buflen) return ret; } +static char *_pam_ldap_attrs[] = { + "host", + "authorizedService", + "shadowExpire", + "shadowFlag", + "shadowInactive", + "shadowLastChange", + "shadowMax", + "shadowMin", + "shadowWarning", + "uidNumber", + NULL +}; + static int _get_user_info (pam_ldap_session_t * session, const char *user) { @@ -2728,7 +2742,7 @@ nxt: } rc = ldap_search_s (session->ld, ssd->base, ssd->scope, - filter, NULL, 0, &res); + filter, _pam_ldap_attrs, 0, &res); if (rc != LDAP_SUCCESS && rc != LDAP_TIMELIMIT_EXCEEDED && rc != LDAP_SIZELIMIT_EXCEEDED) |
