diff options
author | Luke Leighton <lkcl@samba.org> | 1998-11-25 14:54:23 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-11-25 14:54:23 +0000 |
commit | c9b2f20efcb9cd2e93f29928442e9a61360fa5a0 (patch) | |
tree | dc9631f1e7aab81c7a71e822a8fcdb132721d107 /source3/rpc_server | |
parent | 9257ab7dbfc49c7619ea8052293aa07d6a094c2e (diff) | |
download | samba-c9b2f20efcb9cd2e93f29928442e9a61360fa5a0.tar.gz samba-c9b2f20efcb9cd2e93f29928442e9a61360fa5a0.tar.bz2 samba-c9b2f20efcb9cd2e93f29928442e9a61360fa5a0.zip |
fixing domain join and domain login problems
(This used to be commit 90a24664318da97a6e8cfe4622a8573c0e3cbe5e)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_netlog.c | 6 | ||||
-rw-r--r-- | source3/rpc_server/srv_sid.c | 19 |
2 files changed, 20 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c index 77b17dca2f..9fa3ed79cc 100644 --- a/source3/rpc_server/srv_netlog.c +++ b/source3/rpc_server/srv_netlog.c @@ -748,7 +748,7 @@ static void api_net_sam_logon( uint16 vuid, strupper(my_name); status = lookup_user_rids(samlogon_user, &r_uid, &r_gid); - status = status == 0 ? getusergroupsnam(samlogon_user, &grp_mem, &num_gids) : 0xC0000000 | NT_STATUS_INVALID_PRIMARY_GROUP; + status = getusergroupsnam(samlogon_user, &grp_mem, &num_gids) ? 0 : 0xC0000000 | NT_STATUS_INVALID_PRIMARY_GROUP; if (status == 0x0) { @@ -787,10 +787,6 @@ static void api_net_sam_logon( uint16 vuid, &global_sam_sid, /* DOM_SID *dom_sid */ NULL); /* char *other_sids */ } - else - { - status = 0xC0000000 | NT_STATUS_NO_SUCH_USER; - } /* Free any allocated groups array. */ if (gids) diff --git a/source3/rpc_server/srv_sid.c b/source3/rpc_server/srv_sid.c index a8a94204c1..216fab657f 100644 --- a/source3/rpc_server/srv_sid.c +++ b/source3/rpc_server/srv_sid.c @@ -162,6 +162,25 @@ BOOL get_member_domain_sid(void) fstring dom3; fstring dom5; + switch (lp_server_role()) + { + case ROLE_DOMAIN_NONE: + { + ZERO_STRUCT(global_member_sid); + return True; + } + case ROLE_DOMAIN_PDC: + { + sid_copy(&global_member_sid, &global_sam_sid); + return True; + } + default: + { + /* member or BDC, we're going for connection to PDC */ + break; + } + } + if (!cli_connect_serverlist(&cli, lp_passwordserver())) { DEBUG(0,("get_member_domain_sid: unable to initialise client connection.\n")); |