1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

fixing domain join and domain login problems

This commit is contained in:
Luke Leighton 0001-01-01 00:00:00 +00:00
parent 06b9100c1c
commit 90a2466431
5 changed files with 23 additions and 11 deletions

View File

@ -126,7 +126,6 @@ static struct smb_passwd *getsmbunixgrpent(void *vp,
{
DOM_SID sid;
char *unix_grpname;
uint32 status;
uint32 rid;
/*

View File

@ -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)

View File

@ -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"));

View File

@ -663,7 +663,7 @@ static void usage(char *pname)
exit(1);
}
if (lp_security() == SEC_DOMAIN && !get_member_domain_sid())
if (!get_member_domain_sid())
{
DEBUG(0,("ERROR: Samba cannot obtain PDC SID from PDC(s) %s.\n",
lp_passwordserver()));

View File

@ -558,9 +558,7 @@ static void run_handles(int numops, struct client_info *cli_info)
static void run_pipegobbler(int numops, struct client_info *cli_info)
{
/*
run_pipegobble(numops, cli_info, PIPE_SAMR);
*/
run_pipegobble(numops, cli_info, PIPE_LSARPC);
}
@ -954,9 +952,9 @@ enum client_action
}
*/
create_procs(nprocs, numops, &cli_info, run_tcpconnect);
/*
create_procs(nprocs, numops, &cli_info, run_pipegobbler);
/*
create_procs(nprocs, numops, &cli_info, run_tcpconnect);
create_procs(nprocs, numops, &cli_info, run_handles);
create_procs(nprocs, numops, &cli_info, run_randomrpc);
*/