]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22802: Add dummy gpo_apply_security_filtering() call.
authorGünther Deschner <gd@samba.org>
Fri, 11 May 2007 15:08:05 +0000 (15:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:21:59 +0000 (12:21 -0500)
Guenther

source/Makefile.in
source/libgpo/gpo_ldap.c
source/libgpo/gpo_sec.c [new file with mode: 0644]

index 93e3dd0e44328c7898d68d55bd09a2f13fc6c4ca..e7494d7031d656b9b5934bd704636f1c50064cd8 100644 (file)
@@ -299,7 +299,7 @@ LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o  libaddns/dnssock.o \
 LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(TALLOC_OBJ)
 
 LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_parse.o libgpo/gpo_util.o \
-             libgpo/gpo_fetch.o libgpo/gpo_filesync.o
+             libgpo/gpo_fetch.o libgpo/gpo_filesync.o libgpo/gpo_sec.o
 LIBGPO_OBJ = $(LIBGPO_OBJ0)
 
 LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o libads/sasl.o \
index fbed60b11d1b5d0cdf53b3b8dd73685e9f7e1439..b595e531fefc20b3bae34d9b97de6b23a63e83cc 100644 (file)
@@ -549,16 +549,23 @@ ADS_STATUS add_gplink_to_gpo_list(ADS_STRUCT *ads,
                        }
                }
 
-               new_gpo = TALLOC_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+               new_gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
                ADS_ERROR_HAVE_NO_MEMORY(new_gpo);
 
-               ZERO_STRUCTP(new_gpo);
-
                status = ads_get_gpo(ads, mem_ctx, gp_link->link_names[i], NULL, NULL, new_gpo);
                if (!ADS_ERR_OK(status)) {
+                       DEBUG(10,("failed to get gpo: %s\n", gp_link->link_names[i]));
                        return status;
                }
 
+               status = ADS_ERROR_NT(gpo_apply_security_filtering(new_gpo, token));
+               if (!ADS_ERR_OK(status)) {
+                       DEBUG(10,("skipping GPO \"%s\" as object has no access to it\n", 
+                               new_gpo->display_name));
+                       TALLOC_FREE(new_gpo);
+                       continue;
+               }
+
                new_gpo->link = link_dn;
                new_gpo->link_type = link_type; 
 
diff --git a/source/libgpo/gpo_sec.c b/source/libgpo/gpo_sec.c
new file mode 100644 (file)
index 0000000..20366a9
--- /dev/null
@@ -0,0 +1,30 @@
+/* 
+ *  Unix SMB/CIFS implementation.
+ *  Group Policy Object Support
+ *  Copyright (C) Guenther Deschner 2007
+ *  
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "includes.h"
+
+/****************************************************************
+****************************************************************/
+
+NTSTATUS gpo_apply_security_filtering(const struct GROUP_POLICY_OBJECT *gpo, 
+                                     const struct GPO_SID_TOKEN *token)
+{
+       return NT_STATUS_OK;
+}