summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-04-23 18:07:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:41 -0500
commit2e0cac8e3eb021aa8f5cad4ce8b72f98036af639 (patch)
treec2a8ad74f394b8c7a7a6286697a5edf91ef6611f /source3/passdb
parent57eb9f47d058cc3c841aca11404bae2fed5367e4 (diff)
downloadsamba-2e0cac8e3eb021aa8f5cad4ce8b72f98036af639.tar.gz
samba-2e0cac8e3eb021aa8f5cad4ce8b72f98036af639.tar.bz2
samba-2e0cac8e3eb021aa8f5cad4ce8b72f98036af639.zip
r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes? Volker (This used to be commit 61d40ac60dd9c8c9bbcf92e4fc57fe1d706bc721)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c4
-rw-r--r--source3/passdb/pdb_nds.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 7d66b0aaf0..7b3d84e43b 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2343,7 +2343,7 @@ static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods,
goto done;
}
- sid_filter = strdup("(&(objectClass=sambaSamAccount)(|");
+ sid_filter = SMB_STRDUP("(&(objectClass=sambaSamAccount)(|");
if (sid_filter == NULL) {
result = NT_STATUS_NO_MEMORY;
goto done;
@@ -3170,7 +3170,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
for (i=0; i<num_rids; i++)
(*attrs)[i] = SID_NAME_UNKNOWN;
- allsids = strdup("");
+ allsids = SMB_STRDUP("");
if (allsids == NULL) return NT_STATUS_NO_MEMORY;
for (i=0; i<num_rids; i++) {
diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c
index 06060d4067..e2f3128fd5 100644
--- a/source3/passdb/pdb_nds.c
+++ b/source3/passdb/pdb_nds.c
@@ -241,7 +241,7 @@ static int berDecodeLoginData(
if(retData)
{
retOctStrLen = *retDataLen + 1;
- retOctStr = (char *)malloc(retOctStrLen);
+ retOctStr = SMB_MALLOC(retOctStrLen);
if(!retOctStr)
{
err = LDAP_OPERATIONS_ERROR;
@@ -404,7 +404,7 @@ static int nmasldap_get_simple_pwd(
size_t pwdBufLen, bufferLen;
bufferLen = pwdBufLen = pwdLen+2;
- pwdBuf = (char *)malloc(pwdBufLen); /* digest and null */
+ pwdBuf = SMB_MALLOC(pwdBufLen); /* digest and null */
if(pwdBuf == NULL)
{
return LDAP_NO_MEMORY;
@@ -568,7 +568,7 @@ static int nmasldap_get_password(
}
bufferLen = pwdBufLen = *pwdSize;
- pwdBuf = (char *)malloc(pwdBufLen+2);
+ pwdBuf = SMB_MALLOC(pwdBufLen+2);
if(pwdBuf == NULL)
{
return LDAP_NO_MEMORY;
@@ -890,7 +890,7 @@ static NTSTATUS pdb_init_NDS_ldapsam_common(PDB_CONTEXT *pdb_context, PDB_METHOD
(*pdb_method)->update_login_attempts = pdb_nds_update_login_attempts;
/* Save location for use in pdb_nds_update_login_attempts */
- ldap_state->location = strdup(location);
+ ldap_state->location = SMB_STRDUP(location);
return NT_STATUS_OK;
}