summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_join.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_join.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_join.c')
-rw-r--r--source3/utils/net_rpc_join.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 12e51a85d1..6a5a7559c3 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -202,14 +202,14 @@ int net_rpc_join_newstyle(int argc, const char **argv)
if (!NT_STATUS_IS_OK(result) &&
!NT_STATUS_EQUAL(result, NT_STATUS_USER_EXISTS)) {
- d_printf("Creation of workstation account failed\n");
+ d_fprintf(stderr, "Creation of workstation account failed\n");
/* If NT_STATUS_ACCESS_DENIED then we have a valid
username/password combo but the user does not have
administrator access. */
if (NT_STATUS_V(result) == NT_STATUS_V(NT_STATUS_ACCESS_DENIED))
- d_printf("User specified does not have administrator privileges\n");
+ d_fprintf(stderr, "User specified does not have administrator privileges\n");
goto done;
}
@@ -317,7 +317,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
if ( NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) &&
(sec_channel_type == SEC_CHAN_BDC) ) {
- d_printf("Please make sure that no computer account\n"
+ d_fprintf(stderr, "Please make sure that no computer account\n"
"named like this machine (%s) exists in the domain\n",
global_myname());
}
@@ -338,7 +338,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
if ( NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) &&
(sec_channel_type == SEC_CHAN_BDC) ) {
- d_printf("Please make sure that no computer account\n"
+ d_fprintf(stderr, "Please make sure that no computer account\n"
"named like this machine (%s) exists in the domain\n",
global_myname());
}