Author: jra
Date: 2006-08-03 01:49:14 +0000 (Thu, 03 Aug 2006)
New Revision: 17378

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17378

Log:
Fix the issues people have been having with mapped
users (username map) and failure to connect to a
share. Essentially, even on a standalone system
we were going into the create_token_from_username()
code (I think by mistake) if the username was mapped.
Fixes bug #3991.

Volker & Jerry - please go over this with a very careful eye
and let me know if this isn't correct (I think it is,
but this isn't my code and it's a dangerous area for
me to be playing in :-).

Jeremy

Modified:
   branches/SAMBA_3_0/source/auth/auth_util.c
   branches/SAMBA_3_0_23/source/auth/auth_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c  2006-08-03 00:59:39 UTC (rev 
17377)
+++ branches/SAMBA_3_0/source/auth/auth_util.c  2006-08-03 01:49:14 UTC (rev 
17378)
@@ -956,8 +956,8 @@
         * mapped to some local unix user.
         */
 
-       if (((lp_server_role() == ROLE_DOMAIN_MEMBER) && !winbind_ping()) ||
-           (server_info->was_mapped)) {
+       if ((lp_server_role() == ROLE_DOMAIN_MEMBER) && 
+                       (server_info->was_mapped || !winbind_ping())) {
                status = create_token_from_username(server_info,
                                                    server_info->unix_name,
                                                    server_info->guest,

Modified: branches/SAMBA_3_0_23/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0_23/source/auth/auth_util.c       2006-08-03 00:59:39 UTC 
(rev 17377)
+++ branches/SAMBA_3_0_23/source/auth/auth_util.c       2006-08-03 01:49:14 UTC 
(rev 17378)
@@ -955,8 +955,8 @@
                return NT_STATUS_NO_MEMORY;
        }
 
-       if (((lp_server_role() == ROLE_DOMAIN_MEMBER) && !winbind_ping()) || 
-               server_info->was_mapped) {
+       if ((lp_server_role() == ROLE_DOMAIN_MEMBER) &&
+                       (server_info->was_mapped || !winbind_ping())) {
                status = create_token_from_username(server_info,
                                                    server_info->unix_name,
                                                    server_info->guest,

Reply via email to