summaryrefslogtreecommitdiffstats
path: root/libgpo
diff options
context:
space:
mode:
Diffstat (limited to 'libgpo')
-rw-r--r--libgpo/gpext/gpext.c9
-rw-r--r--libgpo/gpo_fetch.c3
-rw-r--r--libgpo/gpo_ini.c2
-rw-r--r--libgpo/gpo_ldap.c6
-rw-r--r--libgpo/wscript_build2
5 files changed, 12 insertions, 10 deletions
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index 080bf07452..42ab622331 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -351,7 +351,7 @@ NTSTATUS gp_ext_info_add_entry(TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct gp_extension_reg_info_entry *entry = NULL;
- entry = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info_entry);
+ entry = talloc_zero(mem_ctx, struct gp_extension_reg_info_entry);
NT_STATUS_HAVE_NO_MEMORY(entry);
status = GUID_from_string(ext_guid, &entry->guid);
@@ -442,7 +442,7 @@ static WERROR gp_extension_store_reg_entry(TALLOC_CTX *mem_ctx,
subkeyname = GUID_string2(mem_ctx, &entry->guid);
W_ERROR_HAVE_NO_MEMORY(subkeyname);
- strupper_m(CONST_DISCARD(char *,subkeyname));
+ strupper_m(discard_const_p(char, subkeyname));
werr = gp_store_reg_subkey(mem_ctx,
subkeyname,
@@ -492,9 +492,10 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
SMB_STRUCT_DIR *dir = NULL;
SMB_STRUCT_DIRENT *dirent = NULL;
- dir = sys_opendir(modules_path(SAMBA_SUBSYSTEM_GPEXT));
+ dir = sys_opendir(modules_path(talloc_tos(),
+ SAMBA_SUBSYSTEM_GPEXT));
if (!dir) {
- return map_nt_error_from_unix(errno);
+ return map_nt_error_from_unix_common(errno);
}
while ((dirent = sys_readdir(dir))) {
diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c
index 40f8c5870d..cae11d5c0d 100644
--- a/libgpo/gpo_fetch.c
+++ b/libgpo/gpo_fetch.c
@@ -34,6 +34,7 @@
#include "lib/util/util.h"
#else
#include "libgpo/gpo_proto.h"
+#include "libsmb/libsmb.h"
#endif
/****************************************************************
@@ -142,7 +143,7 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct loadparm_context *lp_
result = cli_full_connection(&cli,
- global_myname(),
+ lp_netbios_name(),
server,
NULL, 0,
service, "A:",
diff --git a/libgpo/gpo_ini.c b/libgpo/gpo_ini.c
index a4bff0e86b..494162466d 100644
--- a/libgpo/gpo_ini.c
+++ b/libgpo/gpo_ini.c
@@ -108,7 +108,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
}
if (write(tmp_fd, data_out, converted_size) != converted_size) {
- status = map_nt_error_from_unix(errno);
+ status = map_nt_error_from_unix_common(errno);
goto out;
}
diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index 6abaf29cf0..9d984b5b99 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -582,7 +582,7 @@ static ADS_STATUS add_gplink_to_gpo_list(ADS_STRUCT *ads,
}
}
- new_gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+ new_gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT);
ADS_ERROR_HAVE_NO_MEMORY(new_gpo);
status = ads_get_gpo(ads, mem_ctx, gp_link->link_names[i],
@@ -640,7 +640,7 @@ ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
return status;
}
- token_sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, 1);
+ token_sids = talloc_array(mem_ctx, struct dom_sid, 1);
ADS_ERROR_HAVE_NO_MEMORY(token_sids);
status = ADS_ERROR_NT(add_sid_to_array_unique(mem_ctx,
@@ -688,7 +688,7 @@ static ADS_STATUS add_local_policy_to_gpo_list(TALLOC_CTX *mem_ctx,
ADS_ERROR_HAVE_NO_MEMORY(gpo_list);
- gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+ gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT);
ADS_ERROR_HAVE_NO_MEMORY(gpo);
gpo->name = talloc_strdup(mem_ctx, "Local Policy");
diff --git a/libgpo/wscript_build b/libgpo/wscript_build
index e2422c566b..f182b44df0 100644
--- a/libgpo/wscript_build
+++ b/libgpo/wscript_build
@@ -2,7 +2,7 @@
bld.SAMBA_SUBSYSTEM('LIBGPO',
source='gpo_util.c gpo_sec.c ../libgpo/gpext/gpext.c gpo_fetch.c gpo_ini.c ../source4/libgpo/ads_convenience.c ../source3/libgpo/gpo_filesync.c ../source4/libgpo/gpo_filesync.c',
- deps='ldb samba-net',
+ deps='ldb samba-net samba-util',
enabled=False
)