don't return 0 on error - bad for scripts
[kai/samba.git] / source3 / utils / smbcacls.c
index 1bfc4757da3f1314ddc001a79bb33b780dc64ef1..f7f12722158548cfc2f5876e6168cb900bb6ba1a 100644 (file)
@@ -735,6 +735,8 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode,
 
        if (!cli_set_secdesc(cli, fnum, sd)) {
                printf("ERROR: secdesc set failed: %s\n", cli_errstr(cli));
+               cli_close(cli, fnum);
+               return EXIT_FAILED;
        }
 
        cli_close(cli, fnum);