svn commit: samba r16124 - in branches/SAMBA_3_0_RELEASE: .
source/include source/lib source/passdb
jerry at samba.org
jerry at samba.org
Fri Jun 9 14:59:05 GMT 2006
Author: jerry
Date: 2006-06-09 14:59:04 +0000 (Fri, 09 Jun 2006)
New Revision: 16124
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16124
Log:
catch a couple of fixes from Guenther
Modified:
branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
branches/SAMBA_3_0_RELEASE/source/include/smbldap.h
branches/SAMBA_3_0_RELEASE/source/lib/smbldap.c
branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c
Changeset:
Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
===================================================================
--- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2006-06-09 13:09:04 UTC (rev 16123)
+++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2006-06-09 14:59:04 UTC (rev 16124)
@@ -65,6 +65,9 @@
* Correct "net ads changetrustpw" to use the sAMAccountName.
* Fix winbindd in ADS domains by removing code using the
UPN and rely upon the sAMAccountName.
+ * Fix a eDir related memory leak.
+ * Don't try to add the sn attribute twice to an LDAP
+ inetOrgPerson + samSamAccount entry.
o Aleksey Fedoseev <fedoseev at ru.ibm.com>
Modified: branches/SAMBA_3_0_RELEASE/source/include/smbldap.h
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/include/smbldap.h 2006-06-09 13:09:04 UTC (rev 16123)
+++ branches/SAMBA_3_0_RELEASE/source/include/smbldap.h 2006-06-09 14:59:04 UTC (rev 16124)
@@ -101,6 +101,7 @@
#define LDAP_ATTR_MOD_TIMESTAMP 41
#define LDAP_ATTR_LOGON_HOURS 42
#define LDAP_ATTR_TRUST_PASSWD_FLAGS 43
+#define LDAP_ATTR_SN 44
typedef struct _attrib_map_entry {
Modified: branches/SAMBA_3_0_RELEASE/source/lib/smbldap.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/lib/smbldap.c 2006-06-09 13:09:04 UTC (rev 16123)
+++ branches/SAMBA_3_0_RELEASE/source/lib/smbldap.c 2006-06-09 14:59:04 UTC (rev 16124)
@@ -52,6 +52,7 @@
{ LDAP_ATTR_LOGOFF_TIME, "logoffTime" },
{ LDAP_ATTR_KICKOFF_TIME, "kickoffTime" },
{ LDAP_ATTR_CN, "cn" },
+ { LDAP_ATTR_SN, "sn" },
{ LDAP_ATTR_DISPLAY_NAME, "displayName" },
{ LDAP_ATTR_HOME_PATH, "smbHome" },
{ LDAP_ATTR_HOME_DRIVE, "homeDrive" },
@@ -106,6 +107,7 @@
{ LDAP_ATTR_LOGOFF_TIME, "sambaLogoffTime" },
{ LDAP_ATTR_KICKOFF_TIME, "sambaKickoffTime" },
{ LDAP_ATTR_CN, "cn" },
+ { LDAP_ATTR_SN, "sn" },
{ LDAP_ATTR_DISPLAY_NAME, "displayName" },
{ LDAP_ATTR_HOME_DRIVE, "sambaHomeDrive" },
{ LDAP_ATTR_HOME_PATH, "sambaHomePath" },
Modified: branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c 2006-06-09 13:09:04 UTC (rev 16123)
+++ branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c 2006-06-09 14:59:04 UTC (rev 16124)
@@ -730,14 +730,21 @@
pwd_len = sizeof(clear_text_pw);
if (pdb_nds_get_password(ldap_state->smbldap_state, user_dn, &pwd_len, clear_text_pw) == LDAP_SUCCESS) {
nt_lm_owf_gen(clear_text_pw, smbntpwd, smblmpwd);
- if (!pdb_set_lanman_passwd(sampass, smblmpwd, PDB_SET))
+ if (!pdb_set_lanman_passwd(sampass, smblmpwd, PDB_SET)) {
+ SAFE_FREE(user_dn);
return False;
+ }
ZERO_STRUCT(smblmpwd);
- if (!pdb_set_nt_passwd(sampass, smbntpwd, PDB_SET))
+ if (!pdb_set_nt_passwd(sampass, smbntpwd, PDB_SET)) {
+ SAFE_FREE(user_dn);
return False;
+ }
ZERO_STRUCT(smbntpwd);
use_samba_attrs = False;
}
+
+ SAFE_FREE(user_dn);
+
} else {
DEBUG(0, ("init_sam_from_ldap: failed to get user_dn for '%s'\n", username));
}
More information about the samba-cvs
mailing list