diff options
author | Simo Sorce <idra@samba.org> | 2008-02-01 14:24:31 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-02-01 14:24:31 -0500 |
commit | 2fffc9a1b1fe2a1490e867bb38462e50c282d2b3 (patch) | |
tree | 428e09c9b35138db8b7ca7161c659a71aa129d29 /source3/registry/regfio.c | |
parent | 93a3c5b3f9927973b4ad1496f593ea147052d1e1 (diff) | |
parent | b708005a7106db26d7df689b887b419c9f2ea41c (diff) | |
download | samba-2fffc9a1b1fe2a1490e867bb38462e50c282d2b3.tar.gz samba-2fffc9a1b1fe2a1490e867bb38462e50c282d2b3.tar.xz samba-2fffc9a1b1fe2a1490e867bb38462e50c282d2b3.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 7dbfc7bdc65314466a83e8121b35c9bcb24b2631)
Diffstat (limited to 'source3/registry/regfio.c')
-rw-r--r-- | source3/registry/regfio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c index 22700e6481..3740ff0ee4 100644 --- a/source3/registry/regfio.c +++ b/source3/registry/regfio.c @@ -1234,7 +1234,7 @@ static void regfio_mem_free( REGF_FILE *file ) /* cleanup for a file opened for write */ - if ( file->open_flags & (O_WRONLY|O_RDWR) ) { + if ((file->fd != -1) && (file->open_flags & (O_WRONLY|O_RDWR))) { prs_struct ps; REGF_SK_REC *sk; @@ -1554,7 +1554,7 @@ static uint32 sk_record_data_size( SEC_DESC * sd ) /* the record size is sizeof(hdr) + name + static members + data_size_field */ - size = sizeof(uint32)*5 + sec_desc_size( sd ) + sizeof(uint32); + size = sizeof(uint32)*5 + ndr_size_security_descriptor(sd, 0) + sizeof(uint32); /* multiple of 8 */ size_mod8 = size & 0xfffffff8; @@ -1784,7 +1784,8 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 ) nk->sec_desc->ref_count = 0; /* size value must be self-inclusive */ - nk->sec_desc->size = sec_desc_size(sec_desc) + sizeof(uint32); + nk->sec_desc->size = ndr_size_security_descriptor(sec_desc, 0) + + sizeof(uint32); DLIST_ADD_END( file->sec_desc_list, nk->sec_desc, REGF_SK_REC *); |