[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu May 20 10:51:32 MDT 2010


The branch, master has been updated
       via  3c1e87a... s3-libgpo: enable LDAP sign in ads_get_gpo_list().
       via  e4bdb7e... s3-libads: add ads_set_sasl_wrap_flags().
       via  33a156f... s3-net: show how to use filters for group policy processing.
       via  9696227... s3-net: let net_ads_gpo() call no_ads when built w/o ads support.
       via  32809ef... s3-net: compile net_ads_gpo_apply().
      from  aadd293... s3-registry: support REG_DWORD_BIG_ENDIAN.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3c1e87a29a776f5add9e7606dca3b909f5ea7445
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 2 21:21:26 2009 +0200

    s3-libgpo: enable LDAP sign in ads_get_gpo_list().
    
    Guenther

commit e4bdb7e00e3acdb4e18dafdbe44cd4826acaaeab
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 2 21:16:45 2009 +0200

    s3-libads: add ads_set_sasl_wrap_flags().
    
    Guenther

commit 33a156f0c13476f431584492977b0d4c28e4e4fb
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 2 22:07:01 2009 +0200

    s3-net: show how to use filters for group policy processing.
    
    Guenther

commit 96962277da64b2507f8c479b920fc06063cc296f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 2 22:04:03 2009 +0200

    s3-net: let net_ads_gpo() call no_ads when built w/o ads support.
    
    Guenther

commit 32809efe766a4090de3bc43296d90785b76b50b9
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 2 21:15:28 2009 +0200

    s3-net: compile net_ads_gpo_apply().
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 libgpo/gpo_ldap.c           |    4 ++++
 source3/include/proto.h     |    1 +
 source3/libads/ads_struct.c |   14 ++++++++++++++
 source3/utils/net_ads.c     |    5 +++++
 source3/utils/net_ads_gpo.c |    6 ++----
 5 files changed, 26 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index 2976826..fe14c5e 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -726,6 +726,10 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
 		return ADS_ERROR_NT(NT_STATUS_INVALID_PARAMETER);
 	}
 
+	if (!ads_set_sasl_wrap_flags(ads, ADS_AUTH_SASL_SIGN)) {
+		return ADS_ERROR(LDAP_INVALID_CREDENTIALS);
+	}
+
 	DEBUG(10,("ads_get_gpo_list: getting GPO list for [%s]\n", dn));
 
 	/* (L)ocal */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 5775ebf..bd188b1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1713,6 +1713,7 @@ char *ads_build_domain(const char *dn);
 ADS_STRUCT *ads_init(const char *realm, 
 		     const char *workgroup,
 		     const char *ldap_server);
+bool ads_set_sasl_wrap_flags(ADS_STRUCT *ads, int flags);
 void ads_destroy(ADS_STRUCT **ads);
 
 const char *ads_get_ldap_server_name(ADS_STRUCT *ads);
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index aef35ad..e01a36c 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -151,6 +151,20 @@ ADS_STRUCT *ads_init(const char *realm,
 	return ads;
 }
 
+/****************************************************************
+****************************************************************/
+
+bool ads_set_sasl_wrap_flags(ADS_STRUCT *ads, int flags)
+{
+	if (!ads) {
+		return false;
+	}
+
+	ads->auth.flags = flags;
+
+	return true;
+}
+
 /*
   free the memory used by the ADS structure initialized with 'ads_init(...)'
 */
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 5989fec..2777772 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2708,6 +2708,11 @@ int net_ads_group(struct net_context *c, int argc, const char **argv)
 	return net_ads_noads();
 }
 
+int net_ads_gpo(int argc, const char **argv)
+{
+	return net_ads_noads();
+}
+
 /* this one shouldn't display a message */
 int net_ads_check(struct net_context *c)
 {
diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c
index 45587bf..e47efe7 100644
--- a/source3/utils/net_ads_gpo.c
+++ b/source3/utils/net_ads_gpo.c
@@ -360,7 +360,6 @@ out:
 	return 0;
 }
 
-#if 0
 static int net_ads_gpo_apply(struct net_context *c, int argc, const char **argv)
 {
 	TALLOC_CTX *mem_ctx;
@@ -392,6 +391,8 @@ static int net_ads_gpo_apply(struct net_context *c, int argc, const char **argv)
 	}
 
 	status = ads_startup(c, false, &ads);
+	/* filter = cse_gpo_name_to_guid_string("Security"); */
+
 	if (!ADS_ERR_OK(status)) {
 		d_printf("got: %s\n", ads_errstr(status));
 		goto out;
@@ -444,7 +445,6 @@ out:
 	talloc_destroy(mem_ctx);
 	return 0;
 }
-#endif
 
 static int net_ads_gpo_link_get(struct net_context *c, int argc, const char **argv)
 {
@@ -626,7 +626,6 @@ out:
 int net_ads_gpo(struct net_context *c, int argc, const char **argv)
 {
 	struct functable func[] = {
-#if 0
 		{
 			"apply",
 			net_ads_gpo_apply,
@@ -635,7 +634,6 @@ int net_ads_gpo(struct net_context *c, int argc, const char **argv)
 			"net ads gpo apply\n"
 			"    Apply GPO to container"
 		},
-#endif
 		{
 			"getgpo",
 			net_ads_gpo_get_gpo,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list