summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-12-18 02:54:18 +0100
committerGünther Deschner <gd@samba.org>2007-12-21 15:29:10 +0100
commitdab660b9dc42b9e5817e59de4c97009796548b92 (patch)
tree6b69902c48c928c7352f2cc2aedbb12df1ee57eb /source3/utils
parent62b3fd209d65caba36595dfbcde83fd74f4047b7 (diff)
downloadsamba-dab660b9dc42b9e5817e59de4c97009796548b92.tar.gz
samba-dab660b9dc42b9e5817e59de4c97009796548b92.tar.bz2
samba-dab660b9dc42b9e5817e59de4c97009796548b92.zip
Move NetJoinDomain and friends to NET_API_STATUS and the static libnetapi_ctx.
Guenther (This used to be commit e640c3a4a7695613e9e619516befbaf3d44ecb10)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_dom.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c
index fd386c95a8..7b5f562727 100644
--- a/source3/utils/net_dom.c
+++ b/source3/utils/net_dom.c
@@ -19,7 +19,7 @@
#include "includes.h"
#include "utils/net.h"
-#include "lib/netapi/joindomain.h"
+#include "lib/netapi/netapi.h"
static int net_dom_usage(int argc, const char **argv)
{
@@ -51,7 +51,7 @@ static int net_dom_unjoin(int argc, const char **argv)
struct cli_state *cli = NULL;
bool reboot = false;
NTSTATUS status;
- WERROR werr;
+ NET_API_STATUS werr;
int ret = -1;
int i;
@@ -90,9 +90,9 @@ static int net_dom_unjoin(int argc, const char **argv)
}
werr = NetUnjoinDomain(server_name, account, password, unjoin_flags);
- if (!W_ERROR_IS_OK(werr)) {
+ if (werr != 0) {
printf("Failed to unjoin domain: %s\n",
- get_friendly_nt_error_msg(werror_to_ntstatus(werr)));
+ get_friendly_nt_error_msg(werror_to_ntstatus(W_ERROR(werr))));
goto done;
}
@@ -136,7 +136,7 @@ static int net_dom_join(int argc, const char **argv)
struct cli_state *cli = NULL;
bool reboot = false;
NTSTATUS status;
- WERROR werr;
+ NET_API_STATUS werr;
int ret = -1;
int i;
@@ -194,10 +194,10 @@ static int net_dom_join(int argc, const char **argv)
werr = NetJoinDomain(server_name, domain_name, account_ou,
Account, password, join_flags);
- if (!W_ERROR_IS_OK(werr)) {
+ if (werr != 0) {
printf("Failed to join domain: %s (WERROR: %s)\n",
- get_friendly_nt_error_msg(werror_to_ntstatus(werr)),
- dos_errstr(werr));
+ get_friendly_nt_error_msg(werror_to_ntstatus(W_ERROR(werr))),
+ dos_errstr(W_ERROR(werr)));
goto done;
}