summaryrefslogtreecommitdiffstats
path: root/source/utils/net_ads.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-10-01 21:20:14 +0000
committerGerald Carter <jerry@samba.org>2006-10-01 21:20:14 +0000
commit6cd6987fc504a8056295113c12f629ad5c4b2868 (patch)
tree1cb4088f4b88d086f5b0bc84ffa99aa3c537e0b2 /source/utils/net_ads.c
parent2f4cccbf3b63db498bde48679c228747f1838f91 (diff)
downloadsamba-6cd6987fc504a8056295113c12f629ad5c4b2868.tar.gz
samba-6cd6987fc504a8056295113c12f629ad5c4b2868.tar.xz
samba-6cd6987fc504a8056295113c12f629ad5c4b2868.zip
r19018: staging for a 3.0.23d on Tuesday (I think we have sufficient changes to warrant one)
Diffstat (limited to 'source/utils/net_ads.c')
-rw-r--r--source/utils/net_ads.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c
index f01f7ac33b3..606e45100e8 100644
--- a/source/utils/net_ads.c
+++ b/source/utils/net_ads.c
@@ -1061,7 +1061,7 @@ static ADS_STATUS net_precreate_machine_acct( ADS_STRUCT *ads, const char *ou )
asprintf(&dn, "%s,%s", ou_str, ads->config.bind_path);
free(ou_str);
- rc = ads_search_dn(ads, &res, dn, NULL);
+ rc = ads_search_dn(ads, (void**)&res, dn, NULL);
ads_msgfree(ads, res);
if (ADS_ERR_OK(rc)) {
@@ -1525,8 +1525,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)) {