fixing domain join and domain login problems
[samba.git] / source3 / rpc_server / srv_netlog.c
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)