summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-09-06 12:29:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:43:30 -0500
commita58dc69813e7f6667f6e6c40072b30f77f36e3a9 (patch)
treed0011c886c1557144379caf0bde8a09eabd2d55b /source3/utils
parentb4449b6b27fa19fd3bf480fc58694b03816ddab6 (diff)
downloadsamba-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.c7
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)) {