mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
Move some libgpo files to root.
Signed-off-by: Günther Deschner <gd@samba.org>
This commit is contained in:
parent
9930e5b3db
commit
cecd142f2b
3
libgpo/config.mk
Normal file
3
libgpo/config.mk
Normal file
@ -0,0 +1,3 @@
|
||||
[SUBSYSTEM::LIBGPO]
|
||||
|
||||
LIBGPO_OBJ_FILES = ../libgpo/gpo_util.o
|
@ -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;
|
@ -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__ */
|
@ -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
|
@ -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;
|
||||
}
|
@ -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)
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user