Skip to content

Commit

Permalink
libgpo: fix segfault in gpo_process_gpo_list().
Browse files Browse the repository at this point in the history
Guenther

Signed-off-by: Günther Deschner <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
  • Loading branch information
gd authored and cryptomilk committed Dec 12, 2013
1 parent 67e0eaa commit c329a6a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions libgpo/gpo_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "../librpc/gen_ndr/ndr_security.h"
#include "../libgpo/gpo.h"
#include "../libcli/security/security.h"
#undef strdup
#include "registry.h"
#include "libgpo/gpo_proto.h"

#if 0
#define DEFAULT_DOMAIN_POLICY "Default Domain Policy"
Expand Down Expand Up @@ -549,9 +550,8 @@ ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
struct gp_extension *gp_ext = NULL;
struct registry_key *root_key = NULL;
struct gp_registry_context *reg_ctx = NULL;
#if 0
WERROR werr;
#endif

status = ADS_ERROR_NT(init_gp_extensions(mem_ctx));
if (!ADS_ERR_OK(status)) {
return status;
Expand All @@ -561,8 +561,7 @@ ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
if (!gp_ext_list) {
return ADS_ERROR_NT(NT_STATUS_DLL_INIT_FAILED);
}
/* FIXME Needs to be replaced with new patchfile_preg calls */
#if 0

/* get the key here */
if (flags & GPO_LIST_FLAG_MACHINE) {
werr = gp_init_reg_ctx(mem_ctx, KEY_HKLM, REG_KEY_WRITE,
Expand All @@ -577,7 +576,6 @@ ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
talloc_free(reg_ctx);
return ADS_ERROR_NT(werror_to_ntstatus(werr));
}
#endif

root_key = reg_ctx->curr_key;

Expand Down

0 comments on commit c329a6a

Please sign in to comment.