if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
d_printf("(%s) srvsvc_NetShareGetInfo failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(r.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(r.out.result) : status;
goto fail;
}
*info502 = talloc_move(mem_ctx, &info.info502);
return NT_STATUS_OK;
- fail:
+fail:
talloc_free(p);
return status;
}
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
d_printf("(%s) OpenHKLM failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(r.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(r.out.result) : status;
goto fail;
}
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(c.out.result)) {
d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(c.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(c.out.result) : status;
goto fail;
}
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(cl.out.result)) {
d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(cl.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(cl.out.result) : status;
goto fail;
}
- fail:
+fail:
talloc_free(mem_ctx);
return status;
}
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(d.out.result)) {
d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(d.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(d.out.result) : status;
goto fail;
}
- fail:
+fail:
talloc_free(mem_ctx);
return status;
}
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(o.out.result)) {
d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(o.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(o.out.result) : status;
goto done;
}
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(s.out.result)) {
d_printf("(%s) SetValue failed: %s, %s\n", __location__,
nt_errstr(status), win_errstr(s.out.result));
+ status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(s.out.result) : status;
goto done;
}
- done:
+done:
talloc_free(hklm);
return status;
}