summaryrefslogtreecommitdiffstats
path: root/source/utils/net_rpc_samsync.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-07-09 16:44:47 +0000
committerGerald Carter <jerry@samba.org>2003-07-09 16:44:47 +0000
commit1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6 (patch)
tree2a7b6689c049b982d8c134e9803aab50e08f7985 /source/utils/net_rpc_samsync.c
parentf005f1cf12b839f3985ab00315da63c584ce803e (diff)
downloadsamba-1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6.tar.gz
samba-1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6.tar.xz
samba-1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6.zip
Large set of changes to add UNIX account/group management
to winbindd. See README.idmap-and-winbind-changes for details.
Diffstat (limited to 'source/utils/net_rpc_samsync.c')
-rw-r--r--source/utils/net_rpc_samsync.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c
index 28316455505..4b31c061f39 100644
--- a/source/utils/net_rpc_samsync.c
+++ b/source/utils/net_rpc_samsync.c
@@ -441,10 +441,17 @@ fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta)
add_ret = smbrun(add_script,NULL);
DEBUG(1,("fetch_account: Running the command `%s' "
"gave %d\n", add_script, add_ret));
-
- /* try and find the possible unix account again */
- passwd = Get_Pwnam(account);
}
+ else {
+ DEBUG(8,("fetch_account_info: no add user/machine script. Asking winbindd\n"));
+ if ( !winbind_create_user( account ) )
+ DEBUG(4,("fetch_account_info: winbind_create_user() failed\n"));
+ }
+
+ /* try and find the possible unix account again */
+ if ( !(passwd = Get_Pwnam(account)) )
+ return NT_STATUS_NO_SUCH_USER;
+
}
sid_copy(&user_sid, get_global_sam_sid());
@@ -912,7 +919,7 @@ fetch_sam_entry(SAM_DELTA_HDR *hdr_delta, SAM_DELTA_CTR *delta,
&delta->als_mem_info, dom_sid);
break;
case SAM_DELTA_DOMAIN_INFO:
- d_printf("SAMBA_DELTA_DOMAIN_INFO not handled\n");
+ d_printf("SAM_DELTA_DOMAIN_INFO not handled\n");
break;
default:
d_printf("Unknown delta record type %d\n", hdr_delta->type);