summaryrefslogtreecommitdiff
path: root/source3/smbd/password.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-12-07 18:25:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:32 -0500
commitacf9d61421faa6c0055d57fdee7db300dc5431aa (patch)
tree5482afecfe9b4a68b9a1f18d541a3109f8143ab7 /source3/smbd/password.c
parent3bd3be97dc8a581c0502410453091c195e322766 (diff)
downloadsamba-acf9d61421faa6c0055d57fdee7db300dc5431aa.tar.gz
samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.tar.bz2
samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.zip
r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r--source3/smbd/password.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index eb389d7013..213ef98ea3 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -139,7 +139,7 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key,
return UID_FIELD_INVALID;
}
- if((vuser = (user_struct *)malloc( sizeof(user_struct) )) == NULL) {
+ if((vuser = SMB_MALLOC_P(user_struct)) == NULL) {
DEBUG(0,("Failed to malloc users struct!\n"));
data_blob_free(&session_key);
return UID_FIELD_INVALID;
@@ -316,7 +316,7 @@ void add_session_user(const char *user)
DEBUG(3,("add_session_user: session userlist already too large.\n"));
return;
}
- newlist = Realloc( session_userlist, len_session_userlist + PSTRING_LEN );
+ newlist = SMB_REALLOC( session_userlist, len_session_userlist + PSTRING_LEN );
if( newlist == NULL ) {
DEBUG(1,("Unable to resize session_userlist\n"));
return;
@@ -498,9 +498,9 @@ BOOL authorise_login(int snum, fstring user, DATA_BLOB password,
char *user_list = NULL;
if ( session_userlist )
- user_list = strdup(session_userlist);
+ user_list = SMB_STRDUP(session_userlist);
else
- user_list = strdup("");
+ user_list = SMB_STRDUP("");
if (!user_list)
return(False);