summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-19 15:02:59 +0100
committerVolker Lendecke <vl@samba.org>2007-12-19 21:09:10 +0100
commite518e19bc0000019f131354f55e9f5b55f6a2c5e (patch)
tree5c8723a1510ebb17ff4bd21068aa67159ad3a68d /source3/rpc_server
parent042201bcc1b7ffc88cdc22b64c70c653b2433703 (diff)
downloadsamba-e518e19bc0000019f131354f55e9f5b55f6a2c5e.tar.gz
samba-e518e19bc0000019f131354f55e9f5b55f6a2c5e.tar.bz2
samba-e518e19bc0000019f131354f55e9f5b55f6a2c5e.zip
Remove Get_Pwnam and its associated static variable
All callers are replaced by Get_Pwnam_alloc (This used to be commit 735f59315497113aebadcf9ad387e3dbfffa284a)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index cc4b4f330f..1d69cb320e 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3325,7 +3325,8 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx, SAM_USER_INFO_23 *id23,
return NT_STATUS_ACCESS_DENIED;
}
- if ((passwd = Get_Pwnam(pdb_get_username(pwd))) == NULL) {
+ passwd = Get_Pwnam_alloc(pwd, pdb_get_username(pwd));
+ if (passwd == NULL) {
DEBUG(1, ("chgpasswd: Username does not exist in system !?!\n"));
}
@@ -3333,6 +3334,7 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx, SAM_USER_INFO_23 *id23,
TALLOC_FREE(pwd);
return NT_STATUS_ACCESS_DENIED;
}
+ TALLOC_FREE(passwd);
}
}
@@ -3406,7 +3408,8 @@ static bool set_user_info_pw(uint8 *pass, struct samu *pwd)
return False;
}
- if ((passwd = Get_Pwnam(pdb_get_username(pwd))) == NULL) {
+ passwd = Get_Pwnam_alloc(pwd, pdb_get_username(pwd));
+ if (passwd == NULL) {
DEBUG(1, ("chgpasswd: Username does not exist in system !?!\n"));
}
@@ -3414,6 +3417,7 @@ static bool set_user_info_pw(uint8 *pass, struct samu *pwd)
TALLOC_FREE(pwd);
return False;
}
+ TALLOC_FREE(passwd);
}
}