s3:auth Make it possible to the auth module to provide a unix token
authorAndrew Bartlett <abartlet@samba.org>
Tue, 25 May 2010 05:34:06 +0000 (15:34 +1000)
committerStefan Metzmacher <metze@samba.org>
Thu, 27 May 2010 10:09:39 +0000 (12:09 +0200)
Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/auth/auth_util.c

index ad454b6df1d753dafa552499098151efbef6603a..5b9c30cd4bd25735c80aba36a4471118d13ae1b9 100644 (file)
@@ -471,7 +471,12 @@ NTSTATUS create_local_token(struct auth_serversupplied_info *server_info)
         * mapped to some local unix user.
         */
 
-       if (((lp_server_role() == ROLE_DOMAIN_MEMBER) && !winbind_ping()) ||
+       if (server_info->ptok) {
+               /* Do nothing.  The auth module already filled in all
+                * the local groups! (probably
+                * auth_samba4/s3compat) */
+               status = NT_STATUS_OK;
+       } else if (((lp_server_role() == ROLE_DOMAIN_MEMBER) && !winbind_ping()) ||
            (server_info->nss_token)) {
                status = create_token_from_username(server_info,
                                                    server_info->unix_name,