added nTSecurityDescriptor field to host acct dump
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Jan 2002 11:59:33 +0000 (11:59 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 3 Jan 2002 11:59:33 +0000 (11:59 +0000)
(This used to be commit f383e19e095eab975bf3d4e622a5c1d1f823171b)

source3/libads/ldap.c

index 5503b6e3535d900e8a64aeeea537bfd71fcbb043..c616f09b6e578e3140361bc5791b28b5039686ec 100644 (file)
@@ -111,11 +111,12 @@ ADS_STATUS ads_find_machine_acct(ADS_STRUCT *ads, void **res, const char *host)
 {
        ADS_STATUS status;
        char *exp;
+       const char *attrs[] = {"*", "nTSecurityDescriptor", NULL};
 
        /* the easiest way to find a machine account anywhere in the tree
           is to look for hostname$ */
        asprintf(&exp, "(samAccountName=%s$)", host);
-       status = ads_search(ads, res, exp, NULL);
+       status = ads_search(ads, res, exp, attrs);
        free(exp);
        return status;
 }
@@ -264,6 +265,7 @@ void ads_dump(ADS_STRUCT *ads, void *res)
                void (*handler)(const char *, struct berval **);
        } handlers[] = {
                {"objectGUID", dump_binary},
+               {"nTSecurityDescriptor", dump_binary},
                {"objectSid", dump_sid},
                {NULL, NULL}
        };