summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-08-22 23:39:26 +0000
committerTim Potter <tpot@samba.org>2002-08-22 23:39:26 +0000
commit266fd83651bb5b2446e136492b82c836a8be095b (patch)
tree357b96bbef47f907e5a1efb836f25cbd5b77146f /source3
parente6de7c24a5d60f0481eef9695780890e360802f9 (diff)
downloadsamba-266fd83651bb5b2446e136492b82c836a8be095b.tar.gz
samba-266fd83651bb5b2446e136492b82c836a8be095b.tar.bz2
samba-266fd83651bb5b2446e136492b82c836a8be095b.zip
Added some new delta types discovered by Ronnie from ethereal"
- SAM_DELTA_RENAME{USER,GROUP,ALIAS} - SAM_DELTA_DELETE{USER,GROUP} Renamed some of the unknown delta types and their unmarshalling functions: - SAM_DELTA_TRUST_DOMS - SAM_DELTA_SECRET_INFO (This used to be commit 1f29276c2ff450c4ca3705c27fb0be71ddcda4ad)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/rpc_netlogon.h51
-rw-r--r--source3/rpc_parse/parse_net.c39
-rw-r--r--source3/rpcclient/cmd_netlogon.c7
-rw-r--r--source3/rpcclient/samsync.c4
4 files changed, 56 insertions, 45 deletions
diff --git a/source3/include/rpc_netlogon.h b/source3/include/rpc_netlogon.h
index 190199e048..5ee8120c68 100644
--- a/source3/include/rpc_netlogon.h
+++ b/source3/include/rpc_netlogon.h
@@ -45,17 +45,22 @@
#define SEC_CHAN_BDC 6
/* Returned delta types */
-#define SAM_DELTA_DOMAIN_INFO 0x01 /* Domain */
-#define SAM_DELTA_GROUP_INFO 0x02 /* Domain groups */
-#define SAM_DELTA_ACCOUNT_INFO 0x05 /* Users */
-#define SAM_DELTA_GROUP_MEM 0x08 /* Group membership */
-#define SAM_DELTA_ALIAS_INFO 0x09 /* Local groups */
-#define SAM_DELTA_ALIAS_MEM 0x0C /* Local group membership */
-#define SAM_DELTA_DOM_INFO 0x0D /* Privilege stuff */
-#define SAM_DELTA_UNK0E_INFO 0x0e /* Privilege stuff */
-#define SAM_DELTA_PRIVS_INFO 0x10 /* Privilege stuff */
-#define SAM_DELTA_UNK12_INFO 0x12 /* Privilege stuff */
-#define SAM_DELTA_SAM_STAMP 0x16 /* Some kind of journal record? */
+#define SAM_DELTA_DOMAIN_INFO 0x01
+#define SAM_DELTA_GROUP_INFO 0x02
+#define SAM_DELTA_RENAME_GROUP 0x04
+#define SAM_DELTA_ACCOUNT_INFO 0x05
+#define SAM_DELTA_RENAME_USER 0x07
+#define SAM_DELTA_GROUP_MEM 0x08
+#define SAM_DELTA_ALIAS_INFO 0x09
+#define SAM_DELTA_RENAME_ALIAS 0x0b
+#define SAM_DELTA_ALIAS_MEM 0x0c
+#define SAM_DELTA_POLICY_INFO 0x0d
+#define SAM_DELTA_TRUST_DOMS 0x0e
+#define SAM_DELTA_PRIVS_INFO 0x10 /* DT_DELTA_ACCOUNTS */
+#define SAM_DELTA_SECRET_INFO 0x12
+#define SAM_DELTA_DELETE_GROUP 0x14
+#define SAM_DELTA_DELETE_USER 0x15
+#define SAM_DELTA_MODIFIED_COUNT 0x16
/* SAM database types */
#define SAM_DATABASE_DOMAIN 0x00 /* Domain users and groups */
@@ -711,7 +716,7 @@ typedef struct sam_alias_mem_info_info
} SAM_ALIAS_MEM_INFO;
-/* SAM_DELTA_DOM (0x0D) */
+/* SAM_DELTA_POLICY (0x0D) */
typedef struct
{
uint32 unknown1; /* 0x5000 */
@@ -753,9 +758,9 @@ typedef struct
UNISTR2 domain_name;
DOM_SID2 domain_sid;
-} SAM_DELTA_DOM;
+} SAM_DELTA_POLICY;
-/* SAM_DELTA_UNK0E (0x0e) */
+/* SAM_DELTA_TRUST_DOMS */
typedef struct
{
uint32 buf_size;
@@ -773,7 +778,7 @@ typedef struct
uint32 unknown3;
UNISTR2 domain;
-} SAM_DELTA_UNK0E;
+} SAM_DELTA_TRUSTDOMS;
/* SAM_DELTA_PRIVS (0x10) */
typedef struct
@@ -812,7 +817,7 @@ typedef struct
} SAM_DELTA_PRIVS;
-/* SAM_DELTA_UNK12 (0x12) */
+/* SAM_DELTA_SECRET */
typedef struct
{
uint32 buf_size;
@@ -846,15 +851,15 @@ typedef struct
uint32 buf_size3;
SEC_DESC *sec_desc2;
-} SAM_DELTA_UNK12;
+} SAM_DELTA_SECRET;
-/* SAM_DELTA_STAMP (0x16) */
+/* SAM_DELTA_MOD_COUNT (0x16) */
typedef struct
{
uint32 seqnum;
uint32 dom_mod_count_ptr;
UINT64_S dom_mod_count; /* domain mod count at last sync */
-} SAM_DELTA_STAMP;
+} SAM_DELTA_MOD_COUNT;
typedef union sam_delta_ctr_info
{
@@ -864,11 +869,11 @@ typedef union sam_delta_ctr_info
SAM_GROUP_MEM_INFO grp_mem_info;
SAM_ALIAS_INFO alias_info ;
SAM_ALIAS_MEM_INFO als_mem_info;
- SAM_DELTA_DOM dom_info;
+ SAM_DELTA_POLICY policy_info;
SAM_DELTA_PRIVS privs_info;
- SAM_DELTA_STAMP stamp;
- SAM_DELTA_UNK0E unk0e_info;
- SAM_DELTA_UNK12 unk12_info;
+ SAM_DELTA_MOD_COUNT mod_count;
+ SAM_DELTA_TRUSTDOMS trustdoms_info;
+ SAM_DELTA_SECRET secret_info;
} SAM_DELTA_CTR;
/* NET_R_SAM_SYNC */
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 52cbc8e8df..ecab979ff2 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1779,7 +1779,7 @@ static BOOL net_io_sam_delta_hdr(char *desc, SAM_DELTA_HDR * delta,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_stamp(char *desc, SAM_DELTA_STAMP *info,
+static BOOL net_io_sam_delta_mod_count(char *desc, SAM_DELTA_MOD_COUNT *info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_delta_stamp");
@@ -2386,12 +2386,12 @@ static BOOL net_io_sam_alias_mem_info(char *desc, SAM_ALIAS_MEM_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_dom_info(char *desc, SAM_DELTA_DOM *info,
+static BOOL net_io_sam_policy_info(char *desc, SAM_DELTA_POLICY *info,
prs_struct *ps, int depth)
{
int i;
- prs_debug(ps, depth, desc, "net_io_sam_dom_info");
+ prs_debug(ps, depth, desc, "net_io_sam_policy_info");
depth++;
if(!prs_align(ps))
@@ -2476,12 +2476,12 @@ static BOOL net_io_sam_dom_info(char *desc, SAM_DELTA_DOM *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_unk0e_info(char *desc, SAM_DELTA_UNK0E *info,
+static BOOL net_io_sam_trustdoms_info(char *desc, SAM_DELTA_TRUSTDOMS *info,
prs_struct *ps, int depth)
{
int i;
- prs_debug(ps, depth, desc, "net_io_sam_unk0e_info");
+ prs_debug(ps, depth, desc, "net_io_sam_trustdoms_info");
depth++;
if(!prs_align(ps))
@@ -2524,12 +2524,12 @@ static BOOL net_io_sam_unk0e_info(char *desc, SAM_DELTA_UNK0E *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_unk12_info(char *desc, SAM_DELTA_UNK12 *info,
- prs_struct *ps, int depth)
+static BOOL net_io_sam_secret_info(char *desc, SAM_DELTA_SECRET *info,
+ prs_struct *ps, int depth)
{
int i;
- prs_debug(ps, depth, desc, "net_io_sam_unk12_info");
+ prs_debug(ps, depth, desc, "net_io_sam_secret_info");
depth++;
if(!prs_align(ps))
@@ -2707,8 +2707,8 @@ static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16],
switch (type) {
/* Seen in sam deltas */
- case SAM_DELTA_SAM_STAMP:
- if (!net_io_sam_delta_stamp("", &delta->stamp, ps, depth))
+ case SAM_DELTA_MODIFIED_COUNT:
+ if (!net_io_sam_delta_mod_count("", &delta->mod_count, ps, depth))
return False;
break;
@@ -2737,8 +2737,8 @@ static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16],
return False;
break;
- case SAM_DELTA_DOM_INFO:
- if (!net_io_sam_dom_info("", &delta->dom_info, ps, depth))
+ case SAM_DELTA_POLICY_INFO:
+ if (!net_io_sam_policy_info("", &delta->policy_info, ps, depth))
return False;
break;
@@ -2752,16 +2752,23 @@ static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16],
return False;
break;
- case SAM_DELTA_UNK0E_INFO:
- if (!net_io_sam_unk0e_info("", &delta->unk0e_info, ps, depth))
+ case SAM_DELTA_TRUST_DOMS:
+ if (!net_io_sam_trustdoms_info("", &delta->trustdoms_info, ps, depth))
return False;
break;
- case SAM_DELTA_UNK12_INFO:
- if (!net_io_sam_unk12_info("", &delta->unk12_info, ps, depth))
+ case SAM_DELTA_SECRET_INFO:
+ if (!net_io_sam_secret_info("", &delta->secret_info, ps, depth))
return False;
break;
+ /* These guys are not implemented yet */
+
+ case SAM_DELTA_RENAME_GROUP:
+ case SAM_DELTA_RENAME_USER:
+ case SAM_DELTA_RENAME_ALIAS:
+ case SAM_DELTA_DELETE_GROUP:
+ case SAM_DELTA_DELETE_USER:
default:
DEBUG(0, ("Replication error: Unknown delta type 0x%x\n", type));
break;
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index c3bc9e5e13..198787f22b 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -125,11 +125,10 @@ static void display_sam_sync(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas,
group->rids[j], group->attribs[j]);
break;
}
- case SAM_DELTA_SAM_STAMP: {
- SAM_DELTA_STAMP *stamp = &deltas[i].stamp;
+ case SAM_DELTA_MODIFIED_COUNT: {
+ SAM_DELTA_MOD_COUNT *mc = &deltas[i].mod_count;
- printf("sam sequence update: 0x%04x\n",
- stamp->seqnum);
+ printf("sam sequence update: 0x%04x\n", mc->seqnum);
break;
}
default:
diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c
index a8344cd5e2..710614469e 100644
--- a/source3/rpcclient/samsync.c
+++ b/source3/rpcclient/samsync.c
@@ -217,8 +217,8 @@ static void decode_sam_deltas(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas, SAM_
decode_sam_als_mem_info(a);
break;
}
- case SAM_DELTA_DOM_INFO: {
- SAM_DELTA_DOM *a;
+ case SAM_DELTA_POLICY_INFO: {
+ SAM_DELTA_POLICY *a;
a = &deltas[i].dom_info;
decode_sam_dom_info(a);
break;