summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c4
-rw-r--r--source3/utils/net_rpc.c10
-rw-r--r--source3/utils/ntlm_auth.c9
3 files changed, 17 insertions, 6 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index f133eec0fc..8e644bb6b2 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1007,6 +1007,8 @@ static NTSTATUS net_ads_join_ok(struct net_context *c)
{
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
+ fstring dc_name;
+ struct sockaddr_storage dcip;
if (!secrets_init()) {
DEBUG(1,("Failed to initialise secrets database\n"));
@@ -1015,6 +1017,8 @@ static NTSTATUS net_ads_join_ok(struct net_context *c)
net_use_krb_machine_account(c);
+ get_dc_name(lp_workgroup(), lp_realm(), dc_name, &dcip);
+
status = ads_startup(c, true, &ads);
if (!ADS_ERR_OK(status)) {
return ads_ntstatus(status);
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 5b3b1e34d7..7dc8c1dd2c 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -3074,13 +3074,19 @@ static int rpc_share_list(struct net_context *c, int argc, const char **argv)
static bool check_share_availability(struct cli_state *cli, const char *netname)
{
- if (!NT_STATUS_IS_OK(cli_tcon_andx(cli, netname, "A:", "", 0))) {
+ NTSTATUS status;
+
+ status = cli_tcon_andx(cli, netname, "A:", "", 0);
+ if (!NT_STATUS_IS_OK(status)) {
d_printf(_("skipping [%s]: not a file share.\n"), netname);
return false;
}
- if (!cli_tdis(cli))
+ status = cli_tdis(cli);
+ if (!NT_STATUS_IS_OK(status)) {
+ d_printf(_("cli_tdis returned %s\n"), nt_errstr(status));
return false;
+ }
return true;
}
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 87df3c6160..57e4251543 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -27,6 +27,7 @@
#include "utils/ntlm_auth.h"
#include "../libcli/auth/libcli_auth.h"
#include "../libcli/auth/spnego.h"
+#include "ntlmssp.h"
#include "smb_krb5.h"
#include <iniparser.h>
@@ -635,7 +636,7 @@ static NTSTATUS local_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *u
return nt_status;
}
-static NTSTATUS ntlm_auth_start_ntlmssp_client(NTLMSSP_STATE **client_ntlmssp_state)
+static NTSTATUS ntlm_auth_start_ntlmssp_client(struct ntlmssp_state **client_ntlmssp_state)
{
NTSTATUS status;
if ( (opt_username == NULL) || (opt_domain == NULL) ) {
@@ -685,7 +686,7 @@ static NTSTATUS ntlm_auth_start_ntlmssp_client(NTLMSSP_STATE **client_ntlmssp_st
return NT_STATUS_OK;
}
-static NTSTATUS ntlm_auth_start_ntlmssp_server(NTLMSSP_STATE **ntlmssp_state)
+static NTSTATUS ntlm_auth_start_ntlmssp_server(struct ntlmssp_state **ntlmssp_state)
{
NTSTATUS status = ntlmssp_server_start(ntlmssp_state);
@@ -1172,7 +1173,7 @@ static void offer_gss_spnego_mechs(void) {
static void manage_gss_spnego_request(struct ntlm_auth_state *state,
char *buf, int length)
{
- static NTLMSSP_STATE *ntlmssp_state = NULL;
+ static struct ntlmssp_state *ntlmssp_state = NULL;
struct spnego_data request, response;
DATA_BLOB token;
NTSTATUS status;
@@ -1415,7 +1416,7 @@ static void manage_gss_spnego_request(struct ntlm_auth_state *state,
return;
}
-static NTLMSSP_STATE *client_ntlmssp_state = NULL;
+static struct ntlmssp_state *client_ntlmssp_state = NULL;
static bool manage_client_ntlmssp_init(struct spnego_data spnego)
{