s3-libads: use shared well known guids.
authorGünther Deschner <gd@samba.org>
Wed, 30 Jun 2010 21:09:05 +0000 (23:09 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 1 Jul 2010 19:17:17 +0000 (21:17 +0200)
Guenther

source3/include/ads.h
source3/libads/ldap.c
source3/utils/net_ads.c

index ee7295d0ccd797ca1583fd525c1d1cfc8f60ffbe..132586fe3109c65a94d1bf67bbd01dc116f2cf92 100644 (file)
@@ -241,9 +241,6 @@ typedef void **ADS_MODLIST;
 #define ADS_AUTH_SASL_FORCE       0x0080
 #define ADS_AUTH_USER_CREDS       0x0100
 
-#define WELL_KNOWN_GUID_COMPUTERS      "AA312825768811D1ADED00C04FD8D5CD" 
-#define WELL_KNOWN_GUID_USERS          "A9D1CA15768811D1ADED00C04FD8D5CD"
-
 enum ads_extended_dn_flags {
        ADS_EXTENDED_DN_HEX_STRING      = 0,
        ADS_EXTENDED_DN_STRING          = 1 /* not supported on win2k */
index 98da8ff4848b8d1766d72ecb50ffb35214131c99..af48fdae5a6572dd7717592047f94aa84be5b02f 100644 (file)
@@ -1602,7 +1602,7 @@ char *ads_ou_string(ADS_STRUCT *ads, const char *org_unit)
 
        if (!org_unit || !*org_unit) {
 
-               ret = ads_default_ou_string(ads, WELL_KNOWN_GUID_COMPUTERS);
+               ret = ads_default_ou_string(ads, DS_GUID_COMPUTERS_CONTAINER);
 
                /* samba4 might not yet respond to a wellknownobject-query */
                return ret ? ret : SMB_STRDUP("cn=Computers");
index 4aea9a7ab49be8ec39582e240552d0a49808f0fd..700d98bd264a1d5673d275849c3c81623591c19f 100644 (file)
@@ -476,7 +476,7 @@ static int ads_user_add(struct net_context *c, int argc, const char **argv)
        if (c->opt_container) {
                ou_str = SMB_STRDUP(c->opt_container);
        } else {
-               ou_str = ads_default_ou_string(ads, WELL_KNOWN_GUID_USERS);
+               ou_str = ads_default_ou_string(ads, DS_GUID_USERS_CONTAINER);
        }
 
        status = ads_add_user_acct(ads, argv[0], ou_str, c->opt_comment);
@@ -770,7 +770,7 @@ static int ads_group_add(struct net_context *c, int argc, const char **argv)
        if (c->opt_container) {
                ou_str = SMB_STRDUP(c->opt_container);
        } else {
-               ou_str = ads_default_ou_string(ads, WELL_KNOWN_GUID_USERS);
+               ou_str = ads_default_ou_string(ads, DS_GUID_USERS_CONTAINER);
        }
 
        status = ads_add_group_acct(ads, argv[0], ou_str, c->opt_comment);