summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-02-23 14:28:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:21 -0500
commit379bd6865f2fa46ea28024ad2bb2162ccfbb0db7 (patch)
treee0bac0a82a9c2e5059fb4fbf5af3993da7624658 /source3/libads
parentda8846ffef8e5f875e5ff9ce064192280634f490 (diff)
downloadsamba-379bd6865f2fa46ea28024ad2bb2162ccfbb0db7.tar.gz
samba-379bd6865f2fa46ea28024ad2bb2162ccfbb0db7.tar.bz2
samba-379bd6865f2fa46ea28024ad2bb2162ccfbb0db7.zip
r13657: Let winbindd try to obtain the gecos field from the msSFU30Gecos
attribute when "winbind nss info = sfu" is set. Fixes #3539. Guenther (This used to be commit ffce0461de130828345c44293e564ca03227607d)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ads_struct.c1
-rw-r--r--source3/libads/ldap.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index d8676d050d..9b2179ad31 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -139,6 +139,7 @@ void ads_destroy(ADS_STRUCT **ads)
SAFE_FREE((*ads)->schema.sfu_gidnumber_attr);
SAFE_FREE((*ads)->schema.sfu_shell_attr);
SAFE_FREE((*ads)->schema.sfu_homedir_attr);
+ SAFE_FREE((*ads)->schema.sfu_gecos_attr);
ZERO_STRUCTP(*ads);
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 6d2155fae0..cb7dbc575b 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -2628,7 +2628,7 @@ BOOL ads_check_sfu_mapping(ADS_STRUCT *ads)
{
BOOL ret = False;
TALLOC_CTX *ctx = NULL;
- const char *gidnumber, *uidnumber, *homedir, *shell;
+ const char *gidnumber, *uidnumber, *homedir, *shell, *gecos;
ctx = talloc_init("ads_check_sfu_mapping");
if (ctx == NULL)
@@ -2654,6 +2654,11 @@ BOOL ads_check_sfu_mapping(ADS_STRUCT *ads)
goto done;
ads->schema.sfu_shell_attr = SMB_STRDUP(shell);
+ gecos = ads_get_attrname_by_oid(ads, ctx, ADS_ATTR_SFU_GECOS_OID);
+ if (gecos == NULL)
+ goto done;
+ ads->schema.sfu_gecos_attr = SMB_STRDUP(gecos);
+
ret = True;
done:
if (ctx)