summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_rights.c
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2006-01-17 21:22:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:09 -0500
commitc42be9fd38556a1cc2e16c8d763a592beb863806 (patch)
treee69234055238ca6996dac2c153ad0c3e44f1e134 /source3/utils/net_rpc_rights.c
parentf7519540090b2f47259f72d81b267b3e7a1a8950 (diff)
downloadsamba-c42be9fd38556a1cc2e16c8d763a592beb863806.tar.gz
samba-c42be9fd38556a1cc2e16c8d763a592beb863806.tar.bz2
samba-c42be9fd38556a1cc2e16c8d763a592beb863806.zip
r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout. Fix some compiler warnings for system() calls where we didn't used the return code. Add appropriate error messages and return with the error code we got from system() or NT_STATUS_UNSUCCESSFUL. (This used to be commit f650e3bdafc4c6bcd7eb4bcf8b6b885b979919eb)
Diffstat (limited to 'source3/utils/net_rpc_rights.c')
-rw-r--r--source3/utils/net_rpc_rights.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index a563475ee1..2c15fef5a0 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -335,15 +335,15 @@ static NTSTATUS rpc_rights_list_internal(const DOM_SID *domain_sid,
if ( !NT_STATUS_IS_OK(result) ) {
if ( NT_STATUS_EQUAL( result, NT_STATUS_NO_SUCH_PRIVILEGE ) )
- d_printf("No such privilege exists: %s.\n", privname);
+ d_fprintf(stderr, "No such privilege exists: %s.\n", privname);
else
- d_printf("Error resolving privilege display name [%s].\n", nt_errstr(result));
+ d_fprintf(stderr, "Error resolving privilege display name [%s].\n", nt_errstr(result));
continue;
}
result = enum_accounts_for_privilege(pipe_hnd, mem_ctx, &pol, privname);
if (!NT_STATUS_IS_OK(result)) {
- d_printf("Error enumerating accounts for privilege %s [%s].\n",
+ d_fprintf(stderr, "Error enumerating accounts for privilege %s [%s].\n",
privname, nt_errstr(result));
continue;
}
@@ -437,7 +437,7 @@ static NTSTATUS rpc_rights_grant_internal(const DOM_SID *domain_sid,
done:
if ( !NT_STATUS_IS_OK(result) ) {
- d_printf("Failed to grant privileges for %s (%s)\n",
+ d_fprintf(stderr, "Failed to grant privileges for %s (%s)\n",
argv[0], nt_errstr(result));
}
@@ -488,7 +488,7 @@ static NTSTATUS rpc_rights_revoke_internal(const DOM_SID *domain_sid,
done:
if ( !NT_STATUS_IS_OK(result) ) {
- d_printf("Failed to revoke privileges for %s (%s)",
+ d_fprintf(stderr, "Failed to revoke privileges for %s (%s)",
argv[0], nt_errstr(result));
}