summaryrefslogtreecommitdiff
path: root/source3/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
commitc5f44afda7f9525c71210391420898178fdf4e65 (patch)
tree61fd608153543abaf474e8231cc0e5d15de005cf /source3/utils
parent86fb267fc817de23a7b95305b2a122510f2376fe (diff)
downloadsamba-c5f44afda7f9525c71210391420898178fdf4e65.tar.gz
samba-c5f44afda7f9525c71210391420898178fdf4e65.tar.bz2
samba-c5f44afda7f9525c71210391420898178fdf4e65.zip
smbcontrol in non-interactive mode was returning True for success --
need to invert this to give the shell 0. (This used to be commit ecc624067c54314834aacbf21d0f2ee54fce37e9)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcontrol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 2d5b20e7ee..98e998a4f7 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/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) {