summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-01 02:13:21 +0100
committerGünther Deschner <gd@samba.org>2009-04-20 23:15:43 +0200
commitcecd142f2bb77787985a1a55b1f55cef7ff9af75 (patch)
tree29057bcded115e8f296cef8b11011a1d76336e80
parent9930e5b3db6b47fa4a1611ed0719ed73340bf8c0 (diff)
downloadsamba-cecd142f2bb77787985a1a55b1f55cef7ff9af75.tar.gz
samba-cecd142f2bb77787985a1a55b1f55cef7ff9af75.tar.xz
samba-cecd142f2bb77787985a1a55b1f55cef7ff9af75.zip
Move some libgpo files to root.
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--libgpo/config.mk3
-rw-r--r--libgpo/gpext/gpext.c (renamed from source3/libgpo/gpext/gpext.c)19
-rw-r--r--libgpo/gpext/gpext.h (renamed from source3/libgpo/gpext/gpext.h)7
-rw-r--r--libgpo/gpo.h (renamed from source3/include/gpo.h)9
-rw-r--r--libgpo/gpo_util.c (renamed from source3/libgpo/gpo_util.c)10
-rw-r--r--source3/Makefile.in4
-rw-r--r--source3/include/includes.h2
7 files changed, 37 insertions, 17 deletions
diff --git a/libgpo/config.mk b/libgpo/config.mk
new file mode 100644
index 0000000000..ebfcafd024
--- /dev/null
+++ b/libgpo/config.mk
@@ -0,0 +1,3 @@
+[SUBSYSTEM::LIBGPO]
+
+LIBGPO_OBJ_FILES = ../libgpo/gpo_util.o
diff --git a/source3/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index ee4ce87c4e..82c0459e45 100644
--- a/source3/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -18,6 +18,9 @@
*/
#include "includes.h"
+#include "../libgpo/gpext/gpext.h"
+#include "librpc/gen_ndr/ndr_misc.h"
+#include "lib/util/dlinklist.h"
static struct gp_extension *extensions = NULL;
@@ -103,7 +106,7 @@ NTSTATUS unregister_gp_extension(const char *name)
}
DLIST_REMOVE(extensions, ext);
- TALLOC_FREE(ext);
+ talloc_free(ext);
DEBUG(2,("Successfully removed GP extension '%s'\n", name));
@@ -150,13 +153,13 @@ NTSTATUS register_gp_extension(TALLOC_CTX *gpext_ctx,
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- entry = TALLOC_ZERO_P(gpext_ctx, struct gp_extension);
+ entry = talloc_zero(gpext_ctx, struct gp_extension);
NT_STATUS_HAVE_NO_MEMORY(entry);
entry->name = talloc_strdup(gpext_ctx, name);
NT_STATUS_HAVE_NO_MEMORY(entry->name);
- entry->guid = TALLOC_ZERO_P(gpext_ctx, struct GUID);
+ entry->guid = talloc_zero(gpext_ctx, struct GUID);
NT_STATUS_HAVE_NO_MEMORY(entry->guid);
status = GUID_from_string(guid, entry->guid);
NT_STATUS_NOT_OK_RETURN(status);
@@ -180,7 +183,7 @@ static NTSTATUS gp_extension_init_module(TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct gp_extension *ext = NULL;
- ext = TALLOC_ZERO_P(mem_ctx, struct gp_extension);
+ ext = talloc_zero(mem_ctx, struct gp_extension);
NT_STATUS_HAVE_NO_MEMORY(gpext);
ext->methods = get_methods_by_name(extensions, name);
@@ -211,7 +214,7 @@ static bool add_gp_extension_reg_entry_to_array(TALLOC_CTX *mem_ctx,
struct gp_extension_reg_entry **entries,
size_t *num)
{
- *entries = TALLOC_REALLOC_ARRAY(mem_ctx, *entries,
+ *entries = talloc_realloc(mem_ctx, *entries,
struct gp_extension_reg_entry,
(*num)+1);
if (*entries == NULL) {
@@ -234,7 +237,7 @@ static bool add_gp_extension_reg_info_entry_to_array(TALLOC_CTX *mem_ctx,
struct gp_extension_reg_info_entry **entries,
size_t *num)
{
- *entries = TALLOC_REALLOC_ARRAY(mem_ctx, *entries,
+ *entries = talloc_realloc(mem_ctx, *entries,
struct gp_extension_reg_info_entry,
(*num)+1);
if (*entries == NULL) {
@@ -262,10 +265,10 @@ static NTSTATUS gp_ext_info_add_reg(TALLOC_CTX *mem_ctx,
struct gp_extension_reg_entry *reg_entry = NULL;
struct registry_value *data = NULL;
- reg_entry = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_entry);
+ reg_entry = talloc_zero(mem_ctx, struct gp_extension_reg_entry);
NT_STATUS_HAVE_NO_MEMORY(reg_entry);
- data = TALLOC_ZERO_P(mem_ctx, struct registry_value);
+ data = talloc_zero(mem_ctx, struct registry_value);
NT_STATUS_HAVE_NO_MEMORY(data);
data->type = type;
diff --git a/source3/libgpo/gpext/gpext.h b/libgpo/gpext/gpext.h
index 0f0445701d..a3f9368f69 100644
--- a/source3/libgpo/gpext/gpext.h
+++ b/libgpo/gpext/gpext.h
@@ -17,6 +17,11 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __GPEXT_H__
+#define __GPEXT_H__
+
+#include "librpc/gen_ndr/winreg.h"
+
#define KEY_WINLOGON_GPEXT_PATH "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions"
#define SAMBA_SUBSYSTEM_GPEXT "gpext"
@@ -77,3 +82,5 @@ struct gp_extension_methods {
NTSTATUS (*shutdown)(void);
};
+
+#endif /* __GPEXT_H__ */
diff --git a/source3/include/gpo.h b/libgpo/gpo.h
index bf5ff6a598..9abf526e14 100644
--- a/source3/include/gpo.h
+++ b/libgpo/gpo.h
@@ -17,6 +17,9 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __GPO_H__
+#define __GPO_H__
+
enum GPO_LINK_TYPE {
GP_LINK_UNKOWN = 0,
GP_LINK_MACHINE = 1,
@@ -59,7 +62,7 @@ struct GROUP_POLICY_OBJECT {
enum GPO_LINK_TYPE link_type;
const char *user_extensions;
const char *machine_extensions;
- SEC_DESC *security_descriptor;
+ struct security_descriptor *security_descriptor;
struct GROUP_POLICY_OBJECT *next, *prev;
};
@@ -155,4 +158,6 @@ struct gp_registry_context {
#define GP_EXT_GUID_REGISTRY "35378EAC-683F-11D2-A89A-00C04FBBCFA2"
#define GP_EXT_GUID_SCRIPTS "42B5FAAE-6536-11D2-AE5A-0000F87571E3"
-#include "libgpo/gpext/gpext.h"
+#include "../libgpo/gpext/gpext.h"
+
+#endif
diff --git a/source3/libgpo/gpo_util.c b/libgpo/gpo_util.c
index 04597b3b57..505400be8c 100644
--- a/source3/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -18,6 +18,8 @@
*/
#include "includes.h"
+#include "../libgpo/gpo.h"
+#undef strdup
#define DEFAULT_DOMAIN_POLICY "Default Domain Policy"
#define DEFAULT_DOMAIN_CONTROLLERS_POLICY "Default Domain Controllers Policy"
@@ -471,7 +473,7 @@ ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads,
if (extension_guid_filter &&
!strequal(extension_guid_filter,
- gp_ext->extensions_guid[i])) {
+ gp_ext->extensions_guid[i])) {
continue;
}
@@ -794,7 +796,7 @@ char *gpo_flag_str(uint32_t flags)
if (flags & GPO_INFO_FLAG_BACKGROUND)
fstrcat(str, "GPO_INFO_FLAG_BACKGROUND ");
- return SMB_STRDUP(str);
+ return strdup(str);
}
/****************************************************************
@@ -807,7 +809,7 @@ NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
const char **filename_out)
{
const char *tmp = NULL;
- SMB_STRUCT_STAT sbuf;
+ struct stat sbuf;
const char *path = NULL;
if (flags & GPO_LIST_FLAG_MACHINE) {
@@ -820,7 +822,7 @@ NTSTATUS gp_find_file(TALLOC_CTX *mem_ctx,
path, suffix);
NT_STATUS_HAVE_NO_MEMORY(tmp);
- if (sys_stat(tmp, &sbuf) == 0) {
+ if (stat(tmp, &sbuf) == 0) {
*filename_out = tmp;
return NT_STATUS_OK;
}
diff --git a/source3/Makefile.in b/source3/Makefile.in
index b47c6e91b2..425d5f1c3b 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -409,9 +409,9 @@ LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o libaddns/dnssock.o \
libaddns/dnsgss.o libaddns/dnsmarshall.o
LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(SOCKET_WRAPPER_OBJ)
-GPEXT_OBJ = libgpo/gpext/gpext.o @GPEXT_STATIC@
+GPEXT_OBJ = ../libgpo/gpext/gpext.o @GPEXT_STATIC@
-LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_ini.o libgpo/gpo_util.o \
+LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_ini.o ../libgpo/gpo_util.o \
libgpo/gpo_fetch.o libgpo/gpo_filesync.o libgpo/gpo_sec.o \
libgpo/gpo_reg.o \
$(GPEXT_OBJ)
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 10319b7429..943de8db7b 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -609,7 +609,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
#include "mapping.h"
#include "passdb.h"
#include "rpc_secdes.h"
-#include "gpo.h"
+#include "../libgpo/gpo.h"
#include "authdata.h"
#include "msdfs.h"
#include "rap.h"