From 2f9076ac29904c98e1a794d04c79db637283f888 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 30 Jun 2010 23:09:05 +0200 Subject: [PATCH] s3-libads: use shared well known guids. Guenther --- source3/include/ads.h | 3 --- source3/libads/ldap.c | 2 +- source3/utils/net_ads.c | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/source3/include/ads.h b/source3/include/ads.h index ee7295d0ccd..132586fe310 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -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 */ diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 98da8ff4848..af48fdae5a6 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -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"); diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 4aea9a7ab49..700d98bd264 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -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); -- 2.34.1