summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-10-02 12:06:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:04 -0500
commitac080e3184abcc177f9f8e8bf2f3537739b9e8ad (patch)
tree78e8d94acd628ff2bec5413151219d2e52864ad3 /source3/utils
parent6b80d173eda176594cc9cc36511ba62079964cfd (diff)
downloadsamba-ac080e3184abcc177f9f8e8bf2f3537739b9e8ad.tar.gz
samba-ac080e3184abcc177f9f8e8bf2f3537739b9e8ad.tar.bz2
samba-ac080e3184abcc177f9f8e8bf2f3537739b9e8ad.zip
r19039: Do not segfault in "net ads printer info" when a requested printserver
does not exist. Guenther (This used to be commit 359315021df3a4dbfe5142e529e3efdbc49e405c)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 2593a59603..53d9f65d6b 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1634,7 +1634,8 @@ static int net_ads_printer_info(int argc, const char **argv)
rc = ads_find_printer_on_server(ads, &res, printername, servername);
if (!ADS_ERR_OK(rc)) {
- d_fprintf(stderr, "ads_find_printer_on_server: %s\n", ads_errstr(rc));
+ d_fprintf(stderr, "Server '%s' not found: %s\n",
+ servername, ads_errstr(rc));
ads_msgfree(ads, res);
ads_destroy(&ads);
return -1;