mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
r9657: fix final issue with regf sk_records; profiles now successfully rewrites
Win2k and WinXP user profile security descriptors. (This used to be commit 3a3bf4ddb702647b48baf9073c4fca0e1e16a194)
This commit is contained in:
parent
d602d8c442
commit
f5b2238bb3
@ -1768,18 +1768,24 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
|
||||
|
||||
DLIST_ADD_END( file->sec_desc_list, nk->sec_desc, tmp );
|
||||
|
||||
/* initialize offsets */
|
||||
|
||||
nk->sec_desc->prev_sk_off = nk->sec_desc->sk_off;
|
||||
nk->sec_desc->next_sk_off = nk->sec_desc->sk_off;
|
||||
|
||||
/* now update the offsets for us and the previous sd in the list */
|
||||
/* update the offsets for us and the previous sd in the list.
|
||||
if this is the first record, then just set the next and prev
|
||||
offsets to ourself. */
|
||||
|
||||
if ( nk->sec_desc->prev ) {
|
||||
REGF_SK_REC *prev = nk->sec_desc->prev;
|
||||
|
||||
nk->sec_desc->prev_sk_off = prev->hbin_off + prev->hbin->first_hbin_off - HBIN_HDR_SIZE;
|
||||
prev->next_sk_off = nk->sec_desc->sk_off;
|
||||
|
||||
/* the end must loop around to the front */
|
||||
nk->sec_desc->next_sk_off = file->sec_desc_list->sk_off;
|
||||
|
||||
/* and first must loop around to the tail */
|
||||
file->sec_desc_list->prev_sk_off = nk->sec_desc->sk_off;
|
||||
} else {
|
||||
nk->sec_desc->prev_sk_off = nk->sec_desc->sk_off;
|
||||
nk->sec_desc->next_sk_off = nk->sec_desc->sk_off;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user