r16683: Fix bug #3900 reported by jason@ncac.gwu.edu.
authorJeremy Allison <jra@samba.org>
Thu, 29 Jun 2006 17:07:21 +0000 (17:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:19:07 +0000 (11:19 -0500)
Jeremy.

source/passdb/pdb_ldap.c

index 839822843b7887d750b0cf535e228fd6e88a6435..4d0c84b5433bb25a2c6b577447dea5b004ad7bbe 100644 (file)
@@ -3796,7 +3796,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
                        continue;
                }
 
-               type = atol(attr);
+               type = (enum SID_NAME_USE)atol(attr);
 
                /* Consistency checks */
                if ((is_builtin && (type != SID_NAME_ALIAS)) ||
@@ -4560,7 +4560,7 @@ static BOOL ldapsam_sid_to_id(struct pdb_methods *methods,
                }
 
                id->gid = strtoul(gid_str, NULL, 10);
-               *type = strtoul(value, NULL, 10);
+               *type = (enum SID_NAME_USE)strtoul(value, NULL, 10);
                ret = True;
                goto done;
        }