The "sk"-block
==============
(due to the complexity of the SAM-info, not clear jet)
-(This is just a security descriptor in the data. R Sharpe.)
+(This is just a self-relative security descriptor in the data. R Sharpe.)
Offset Size Contents
#define SEC_DESC_RES 1
#define SEC_DESC_OCU 2
#define SEC_DESC_NBK 3
+typedef struct sk_struct SK_HDR;
struct key_sec_desc_s {
struct key_sec_desc_s *prev, *next;
int ref_cnt;
int state;
int offset;
+ SK_HDR *sk_hdr; /* This means we must keep the registry in memory */
SEC_DESC *sec_desc;
};
#define REG_SK_ID 0x6B73
-typedef struct sk_struct {
+struct sk_struct {
WORD SK_ID;
WORD uk1;
DWORD prev_off;
DWORD ref_cnt;
DWORD rec_size;
char sec_desc[1];
-} SK_HDR;
+};
typedef struct ace_struct {
unsigned char type;
return size;
}
+/*
+ * Flatten and store the Sec Desc
+ */
+unsigned int nt_store_sec_desc(REGF *regf, SEC_DESC *sd, char *locn)
+{
+
+ return 0;
+}
+
/*
* Store the security information
*
/* Allocate that much space */
sk_hdr = nt_alloc_regf_space(regf, size, &sk_off);
+ sec->sk_hdr = sk_hdr;
if (!sk_hdr) return 0;
/* Now, lay out the sec_desc in the space provided */
+ sk_hdr->SK_ID = REG_SK_ID;
+
+ /*
+ * We can't deal with the next and prev offset in the SK_HDRs until the
+ * whole tree has been stored, then we can go and deal with them
+ */
+
+ sk_hdr->ref_cnt = sec->ref_cnt;
+ sk_hdr->rec_size = size; /* Is this correct */
+
+ /* Now, lay out the sec_desc */
+
return 0;
}