From 0164047afbd082b0003147845a72ca08b4781b81 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 7 Jun 2000 01:49:23 +0000 Subject: 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) --- source3/tdb/tdbutil.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source3/tdb') 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; } -- cgit