mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
net_vampire: move ldif code out of net_rpc_samsync.c
Guenther
(This used to be commit 1d5758ec3a
)
This commit is contained in:
parent
ccdcbc2efe
commit
51fec7863b
@ -893,6 +893,7 @@ SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
|
||||
|
||||
LIBNET_OBJ = libnet/libnet_join.o \
|
||||
libnet/libnet_samsync.o \
|
||||
libnet/libnet_samsync_ldif.o \
|
||||
librpc/gen_ndr/ndr_libnet_join.o
|
||||
|
||||
NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
|
||||
|
@ -24,41 +24,12 @@ enum net_samsync_mode {
|
||||
NET_SAMSYNC_MODE_DUMP = 2
|
||||
};
|
||||
|
||||
/* Structure for mapping accounts to groups */
|
||||
/* Array element is the group rid */
|
||||
typedef struct _groupmap {
|
||||
uint32_t rid;
|
||||
uint32_t gidNumber;
|
||||
const char *sambaSID;
|
||||
const char *group_dn;
|
||||
} GROUPMAP;
|
||||
|
||||
typedef struct _accountmap {
|
||||
uint32_t rid;
|
||||
const char *cn;
|
||||
} ACCOUNTMAP;
|
||||
|
||||
struct samsync_ldif_context {
|
||||
GROUPMAP *groupmap;
|
||||
ACCOUNTMAP *accountmap;
|
||||
bool initialized;
|
||||
const char *add_template;
|
||||
const char *mod_template;
|
||||
char *add_name;
|
||||
char *mod_name;
|
||||
FILE *add_file;
|
||||
FILE *mod_file;
|
||||
FILE *ldif_file;
|
||||
const char *suffix;
|
||||
int num_alloced;
|
||||
};
|
||||
|
||||
struct samsync_context {
|
||||
enum net_samsync_mode mode;
|
||||
const struct dom_sid *domain_sid;
|
||||
const char *domain_sid_str;
|
||||
const char *ldif_filename;
|
||||
struct samsync_ldif_context *ldif;
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
typedef NTSTATUS (*samsync_fn_t)(TALLOC_CTX *,
|
||||
@ -66,3 +37,9 @@ typedef NTSTATUS (*samsync_fn_t)(TALLOC_CTX *,
|
||||
struct netr_DELTA_ENUM_ARRAY *,
|
||||
NTSTATUS,
|
||||
struct samsync_context *);
|
||||
|
||||
NTSTATUS fetch_sam_entries_ldif(TALLOC_CTX *mem_ctx,
|
||||
enum netr_SamDatabaseID database_id,
|
||||
struct netr_DELTA_ENUM_ARRAY *r,
|
||||
NTSTATUS result,
|
||||
struct samsync_context *ctx);
|
||||
|
1209
source3/libnet/libnet_samsync_ldif.c
Normal file
1209
source3/libnet/libnet_samsync_ldif.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user