summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-06-07 01:49:23 +0000
committerJeremy Allison <jra@samba.org>2000-06-07 01:49:23 +0000
commit0164047afbd082b0003147845a72ca08b4781b81 (patch)
tree97d07fd0749d687d0838efc2464520b7489128ed /source3/tdb
parentd253db1b9a10644940650cc802feb2a509adbaed (diff)
downloadsamba-0164047afbd082b0003147845a72ca08b4781b81.tar.gz
samba-0164047afbd082b0003147845a72ca08b4781b81.tar.bz2
samba-0164047afbd082b0003147845a72ca08b4781b81.zip
Fixing get/set of security descriptors.
Removed ugly hack for NT printing. Fixed up tdb parse stuff memory leaks. Jeremy. (This used to be commit 8ef41f31c53e14ad057d883810a1cd2301fede2a)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdbutil.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 5675061b37..d2eb6b5ec7 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -258,8 +258,8 @@ int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps)
TDB_DATA kbuf, dbuf;
kbuf.dptr = keystr;
kbuf.dsize = strlen(keystr)+1;
- dbuf.dptr = ps->data_p;
- dbuf.dsize = ps->data_offset;
+ dbuf.dptr = prs_data_p(ps);
+ dbuf.dsize = prs_offset(ps);
return tdb_store(tdb, kbuf, dbuf, TDB_REPLACE);
}
@@ -275,12 +275,8 @@ int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps)
if (!dbuf.dptr) return -1;
ZERO_STRUCTP(ps);
- ps->io = UNMARSHALL;
- ps->align = 4;
- ps->data_p = dbuf.dptr;
- ps->data_offset = 0;
- ps->buffer_size = dbuf.dsize;
- ps->grow_size = dbuf.dsize;
+ prs_init(ps, 0, 4, UNMARSHALL);
+ prs_give_memory(ps, dbuf.dptr, dbuf.dsize, True);
return 0;
}