summaryrefslogtreecommitdiffstats
path: root/source/utils
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-12-21 04:33:28 +0000
committerMartin Pool <mbp@samba.org>2001-12-21 04:33:28 +0000
commitecc624067c54314834aacbf21d0f2ee54fce37e9 (patch)
treee33f197a85bd90f9b08c9d6bf3513505eb1c3561 /source/utils
parent53f1c0298b526dcacae956453a4b95fff226d0b8 (diff)
downloadsamba-ecc624067c54314834aacbf21d0f2ee54fce37e9.tar.gz
samba-ecc624067c54314834aacbf21d0f2ee54fce37e9.tar.xz
samba-ecc624067c54314834aacbf21d0f2ee54fce37e9.zip
smbcontrol in non-interactive mode was returning True for success --
need to invert this to give the shell 0.
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/smbcontrol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c
index 2d5b20e7eea..98e998a4f76 100644
--- a/source/utils/smbcontrol.c
+++ b/source/utils/smbcontrol.c
@@ -451,7 +451,10 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params)
if (!interactive) {
if (argc < 2) usage(True);
- return (do_command(argv[0],argv[1], argc-2, argc > 2 ? &argv[2] : 0));
+ /* Need to invert sense of return code -- samba
+ * routines mostly return True==1 for success, but
+ * shell needs 0. */
+ return ! do_command(argv[0],argv[1], argc-2, argc > 2 ? &argv[2] : 0);
}
while (True) {