summaryrefslogtreecommitdiff
path: root/source3/utils/smbpasswd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-04 07:13:01 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-04 07:13:01 +0000
commit19fea3242cf6234786b6cbb60631e0071f31ff9f (patch)
tree1de6e79890a80a1e03cf0dce5813513aaf51bc59 /source3/utils/smbpasswd.c
parent55cf37488f66eba2826dba08e80dd4ab6df33fc3 (diff)
downloadsamba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.gz
samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.bz2
samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.zip
the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
Diffstat (limited to 'source3/utils/smbpasswd.c')
-rw-r--r--source3/utils/smbpasswd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 74b9916d93..74f4e8833a 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -162,13 +162,13 @@ Join a domain using the administrator username and password
/* Macro for checking RPC error codes to make things more readable */
#define CHECK_RPC_ERR(rpc, msg) \
- if ((result = rpc) != NT_STATUS_OK) { \
+ if (!NT_STATUS_IS_OK(result = rpc)) { \
DEBUG(0, (msg ": %s\n", get_nt_error_msg(result))); \
goto done; \
}
#define CHECK_RPC_ERR_DEBUG(rpc, debug_args) \
- if ((result = rpc) != NT_STATUS_OK) { \
+ if (!NT_STATUS_IS_OK(result = rpc)) { \
DEBUG(0, debug_args); \
goto done; \
}
@@ -203,7 +203,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
/* Misc */
- uint32 result;
+ NTSTATUS result;
int retval = 1;
/* Connect to remote machine */
@@ -301,7 +301,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
result = NT_STATUS_USER_EXISTS;
}
- if (result == NT_STATUS_USER_EXISTS) {
+ if (NT_STATUS_V(result) == NT_STATUS_V(NT_STATUS_USER_EXISTS)) {
uint32 num_rids, *name_types, *user_rids;
uint32 flags = 0x3e8;
char *names;
@@ -334,7 +334,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
("could not re-open existing user %s: %s\n",
acct_name, get_nt_error_msg(result)));
- } else if (result != NT_STATUS_OK) {
+ } else if (!NT_STATUS_IS_OK(result)) {
DEBUG(0, ("error creating domain user: %s\n",
get_nt_error_msg(result)));
goto done;