fixing domain join and domain login problems
authorLuke Leighton <lkcl@samba.org>
Wed, 25 Nov 1998 14:54:23 +0000 (14:54 +0000)
committerLuke Leighton <lkcl@samba.org>
Wed, 25 Nov 1998 14:54:23 +0000 (14:54 +0000)
(This used to be commit 90a24664318da97a6e8cfe4622a8573c0e3cbe5e)

source3/passdb/smbpassgroupunix.c
source3/rpc_server/srv_netlog.c
source3/rpc_server/srv_sid.c
source3/smbd/server.c
source3/utils/rpctorture.c

index 0e621cb3cc04668e76ffadd365f9e3a6ab1a0b67..d83196415cf2fba725699a2a4ba5b0cb86abef11 100644 (file)
@@ -126,7 +126,6 @@ static struct smb_passwd *getsmbunixgrpent(void *vp,
        {
                DOM_SID sid;
                char *unix_grpname;
-               uint32 status;
                uint32 rid;
 
                /*
index 77b17dca2f574653edcfa44479beaa8c0f379c80..9fa3ed79cc106303fe84cd72907718f4d764121a 100644 (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)
index a8a94204c1bce520451bebca179685ddd6c3e06f..216fab657f92b5f42f50c93d2ff22508b71c1453 100644 (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"));
index e064b52dfa9c7a71e2acb7b680dcc83c15a88881..acde9eebf351afbbef3b21c45fc82e4e27e414a0 100644 (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()));
index dac64a22e3a854f9faa0b3ece9b0122968dad7f5..3b2a497ad4548c86cc64d44b74c5c795aaed4f58 100644 (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);
 */