diff options
author | Günther Deschner <gd@samba.org> | 2011-07-05 14:01:40 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-07-07 18:06:02 +0200 |
commit | cfc3b6e5f79f253e83dfbd13d47b671deb5801b3 (patch) | |
tree | 472e8a614fd1f234bb1e4b546a64b020b83df98e /source3/utils | |
parent | 5dd8185d852afc3843253c9471326677f8816a77 (diff) | |
download | samba-cfc3b6e5f79f253e83dfbd13d47b671deb5801b3.tar.gz samba-cfc3b6e5f79f253e83dfbd13d47b671deb5801b3.tar.bz2 samba-cfc3b6e5f79f253e83dfbd13d47b671deb5801b3.zip |
s3-printing: make sure to first migrate the printers then the security descriptor.
Guenther
Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_printing.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/utils/net_printing.c b/source3/utils/net_printing.c index cefbd6eec6..fd33ede152 100644 --- a/source3/utils/net_printing.c +++ b/source3/utils/net_printing.c @@ -284,6 +284,17 @@ static NTSTATUS printing_migrate_internal(struct net_context *c, SAFE_FREE(dbuf.dptr); continue; } + SAFE_FREE(dbuf.dptr); + } + + for (kbuf = tdb_firstkey_compat(tdb); + kbuf.dptr; + kbuf = tdb_nextkey_compat(tdb, kbuf)) + { + dbuf = tdb_fetch_compat(tdb, kbuf); + if (!dbuf.dptr) { + continue; + } if (strncmp((const char *) kbuf.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX)) == 0) { printing_tdb_migrate_secdesc(tmp_ctx, @@ -294,6 +305,7 @@ static NTSTATUS printing_migrate_internal(struct net_context *c, SAFE_FREE(dbuf.dptr); continue; } + SAFE_FREE(dbuf.dptr); } |