diff options
author | Günther Deschner <gd@samba.org> | 2006-09-06 12:29:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:43:30 -0500 |
commit | a58dc69813e7f6667f6e6c40072b30f77f36e3a9 (patch) | |
tree | d0011c886c1557144379caf0bde8a09eabd2d55b /source3/utils | |
parent | b4449b6b27fa19fd3bf480fc58694b03816ddab6 (diff) | |
download | samba-a58dc69813e7f6667f6e6c40072b30f77f36e3a9.tar.gz samba-a58dc69813e7f6667f6e6c40072b30f77f36e3a9.tar.bz2 samba-a58dc69813e7f6667f6e6c40072b30f77f36e3a9.zip |
r18170: Make sure to actually get the printing data before trying to publish it
in AD.
Guenther
(This used to be commit 1bb29acb3bf40afdb5bc196ab7dbc642e2fdd680)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index af95c3a908..5134727066 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1719,8 +1719,11 @@ static int net_ads_printer_publish(int argc, const char **argv) return -1; } - get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, - printername); + if (!W_ERROR_IS_OK(get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, + printername))) { + ads_destroy(&ads); + return -1; + } rc = ads_add_printer_entry(ads, prt_dn, mem_ctx, &mods); if (!ADS_ERR_OK(rc)) { |