r3185: Machines can login with krb5, so we need to allow them to map to a unix account.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 25 Oct 2004 04:16:57 +0000 (04:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:04:38 +0000 (13:04 -0500)
Andrew Bartlett
(This used to be commit fbe932ddd4282c3d8af8a28fdd0cee83d0c8f4f3)

source4/ntvfs/unixuid/vfs_unixuid.c

index d0060bf11d7ef5ff6642b91008ff78f3f2348ea0..440ebd21c8482993b38ca92155e556d8c64b4a99 100644 (file)
@@ -57,8 +57,8 @@ static NTSTATUS sid_to_unixuid(struct ntvfs_module_context *ntvfs,
 
        /* make sure its a user, not a group */
        atype = samdb_result_uint(res[0], "sAMAccountType", 0);
-       if (atype && atype != ATYPE_NORMAL_ACCOUNT) {
-               DEBUG(0,("sid_to_unixuid: sid %s is not ATYPE_NORMAL_ACCOUNT\n", sidstr));
+       if (!atype || (!(atype & ATYPE_ACCOUNT))) {
+               DEBUG(0,("sid_to_unixuid: sid %s is not an account!\n", sidstr));
                talloc_free(ctx);
                return NT_STATUS_ACCESS_DENIED;
        }