summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b24ec7a944..2d205543fb 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -510,9 +510,9 @@ int smb_create_user(char *unix_user, char *homedir)
pstrcpy(add_script, lp_adduser_script());
if (! *add_script) return -1;
- pstring_sub(add_script, "%u", unix_user);
+ all_string_sub(add_script, "%u", unix_user, sizeof(pstring));
if (homedir)
- pstring_sub(add_script, "%H", homedir);
+ all_string_sub(add_script, "%H", homedir, sizeof(pstring));
ret = smbrun(add_script,NULL,False);
DEBUG(3,("smb_create_user: Running the command `%s' gave %d\n",add_script,ret));
return ret;
@@ -529,7 +529,7 @@ static int smb_delete_user(char *unix_user)
pstrcpy(del_script, lp_deluser_script());
if (! *del_script) return -1;
- pstring_sub(del_script, "%u", unix_user);
+ all_string_sub(del_script, "%u", unix_user, sizeof(pstring));
ret = smbrun(del_script,NULL,False);
DEBUG(3,("smb_delete_user: Running the command `%s' gave %d\n",del_script,ret));
return ret;
@@ -898,10 +898,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
/* if the username exists as a domain/username pair on the unix system then use
that */
- if (!getpwnam(user)) {
+ if (!sys_getpwnam(user)) {
pstring user2;
slprintf(user2,sizeof(user2),"%s%s%s", dos_to_unix(domain,False), lp_winbind_separator(), user);
- if (getpwnam(user2)) {
+ if (sys_getpwnam(user2)) {
DEBUG(3,("Using unix username %s\n", user2));
pstrcpy(user, user2);
}