testprogs: Return the correct error status code
[samba.git] / testprogs / blackbox / common_test_fns.inc
index 8d755a4884726059fd25063347ddd56d9dc90e63..a5611c63fa044336d74985ded4d63111706ae5e5 100755 (executable)
@@ -99,8 +99,11 @@ kerberos_kinit() {
                kpassfile=$(mktemp)
                echo $password > ${kpassfile}
                $kinit_tool --password-file=${kpassfile} $principal $@
+               status=$?
                rm -f ${kpassfile}
        else
                echo $password | $kinit_tool $principal $@
+               status=$?
        fi
+       return $status
 }