s4:regshell - don't return an error code if we get a security descriptors error
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Sun, 21 Mar 2010 14:54:17 +0000 (15:54 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Sun, 21 Mar 2010 14:56:26 +0000 (15:56 +0100)
s4 itself doesn't support them so print only the error code out (in s4's case
WERR_NOT_SUPPORTED).

source4/lib/registry/tools/regshell.c

index 003cbd15e07aaafab222cc573aaf6063929c73c9..1ead1a67f49a8542c0bc24932c10a549632882b6 100644 (file)
@@ -140,8 +140,8 @@ static WERROR cmd_info(struct regshell_context *ctx, int argc, char **argv)
 
        error = reg_get_sec_desc(ctx, ctx->current, &sec_desc);
        if (!W_ERROR_IS_OK(error)) {
-               printf("Error getting security descriptor\n");
-               return error;
+               printf("Error getting security descriptor: %s\n", win_errstr(error));
+               return WERR_OK;
        }
        ndr_print_debug((ndr_print_fn_t)ndr_print_security_descriptor,
                        "Security", sec_desc);