summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpcclient.h2
-rw-r--r--source3/passdb/smbpassfile.c4
-rw-r--r--source3/rpc_client/cli_lsarpc.c6
-rw-r--r--source3/rpc_client/cli_srvsvc.c2
-rw-r--r--source3/rpc_parse/parse_lsa.c2
-rw-r--r--source3/rpcclient/cmd_lsarpc.c40
-rw-r--r--source3/smbd/process.c1
7 files changed, 28 insertions, 29 deletions
diff --git a/source3/include/rpcclient.h b/source3/include/rpcclient.h
index 4380c1236f..2835203ca8 100644
--- a/source3/include/rpcclient.h
+++ b/source3/include/rpcclient.h
@@ -24,6 +24,8 @@
#ifndef _RPCCLIENT_H
#define _RPCCLIENT_H
+#define report fprintf
+
struct tar_client_info
{
int blocksize;
diff --git a/source3/passdb/smbpassfile.c b/source3/passdb/smbpassfile.c
index ecf9efe303..83b0e7ef6b 100644
--- a/source3/passdb/smbpassfile.c
+++ b/source3/passdb/smbpassfile.c
@@ -22,8 +22,8 @@
extern int DEBUGLEVEL;
BOOL global_machine_password_needs_changing = False;
-static int mach_passwd_lock_depth;
-static FILE *mach_passwd_fp;
+static int mach_passwd_lock_depth = 0;
+static FILE *mach_passwd_fp = NULL;
/************************************************************************
Routine to get the name for a trust account file.
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 1c764c8b98..af00949325 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -264,7 +264,7 @@ BOOL lsa_lookup_names(struct cli_state *cli, uint16 fnum,
if (p && r_l.status != 0)
{
/* report error code */
- DEBUG(0,("LSA_LOOKUP_NAMES: %s\n", get_nt_error_msg(r_l.status)));
+ DEBUG(1,("LSA_LOOKUP_NAMES: %s\n", get_nt_error_msg(r_l.status)));
p = False;
}
@@ -390,10 +390,10 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum,
lsa_io_r_lookup_sids("", &r_l, &rbuf, 0);
p = rbuf.offset != 0;
- if (p && r_l.status != 0)
+ if (p && r_l.status != 0 && r_l.status != 0x107)
{
/* report error code */
- DEBUG(0,("LSA_LOOKUP_SIDS: %s\n", get_nt_error_msg(r_l.status)));
+ DEBUG(1,("LSA_LOOKUP_SIDS: %s\n", get_nt_error_msg(r_l.status)));
p = False;
}
diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c
index 5e4af69c6a..c3d608c4b3 100644
--- a/source3/rpc_client/cli_srvsvc.c
+++ b/source3/rpc_client/cli_srvsvc.c
@@ -160,7 +160,7 @@ BOOL do_srv_net_srv_sess_enum(struct cli_state *cli, uint16 fnum,
if (p && r_o.status != 0)
{
/* report error code */
- DEBUG(0,("SRV_R_NET_SRV_GET_INFO: %s\n", get_nt_error_msg(r_o.status)));
+ DEBUG(0,("SRV_R_NET_SRV_SESS_ENUM: %s\n", get_nt_error_msg(r_o.status)));
p = 0;
}
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index dbcc9d8bcc..cff4c027e1 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -493,7 +493,7 @@ void make_q_query_secret(LSA_Q_QUERY_SECRET *q_q, POLICY_HND *pol)
{
if (q_q == NULL) return;
- DEBUG(5,("make_q_query_secret"));
+ DEBUG(5,("make_q_query_secret\n"));
memcpy(&(q_q->pol), pol, sizeof(q_q->pol));
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 101100e66d..57336362d1 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -21,7 +21,6 @@
*/
-
#ifdef SYSLOG
#undef SYSLOG
#endif
@@ -33,11 +32,10 @@ extern int DEBUGLEVEL;
#define DEBUG_TESTING
-extern struct cli_state *smb_cli;
-extern int smb_tidx;
-
extern FILE* out_hnd;
+extern struct cli_state *smb_cli;
+extern int smb_tidx;
/****************************************************************************
nt lsa query
@@ -93,25 +91,25 @@ void cmd_lsa_query_info(struct client_info *info)
fstring sid;
DEBUG(5,("cmd_lsa_query_info: query succeeded\n"));
- fprintf(out_hnd, "LSA Query Info Policy\n");
+ report(out_hnd, "LSA Query Info Policy\n");
if (info->dom.level3_dom[0] != 0)
{
sid_to_string(sid, &info->dom.level3_sid);
- fprintf(out_hnd, "Domain Member - Domain: %s SID: %s\n",
+ report(out_hnd, "Domain Member - Domain: %s SID: %s\n",
info->dom.level3_dom, sid);
domain_something = True;
}
if (info->dom.level5_dom[0] != 0)
{
sid_to_string(sid, &info->dom.level5_sid);
- fprintf(out_hnd, "Domain Controller - Domain: %s SID: %s\n",
+ report(out_hnd, "Domain Controller - Domain: %s SID: %s\n",
info->dom.level5_dom, sid);
domain_something = True;
}
if (!domain_something)
{
- fprintf(out_hnd, "%s is not a Domain Member or Controller\n",
+ report(out_hnd, "%s is not a Domain Member or Controller\n",
info->dest_host);
}
}
@@ -154,7 +152,7 @@ void cmd_lsa_lookup_names(struct client_info *info)
if (num_names == 0)
{
- fprintf(out_hnd, "lookupnames <name> [<name> ...]\n");
+ report(out_hnd, "lookupnames <name> [<name> ...]\n");
return;
}
@@ -188,11 +186,11 @@ void cmd_lsa_lookup_names(struct client_info *info)
if (sids != NULL)
{
- fprintf(out_hnd,"Lookup Names:\n");
+ report(out_hnd, "Lookup Names:\n");
for (i = 0; i < num_sids; i++)
{
sid_to_string(temp, &sids[i]);
- fprintf(out_hnd, "SID: %s -> %s\n", names[i], temp);
+ report(out_hnd, "SID: %s -> %s\n", names[i], temp);
#if 0
if (sids[i] != NULL)
{
@@ -248,7 +246,7 @@ void cmd_lsa_lookup_sids(struct client_info *info)
if (sid_name[0] == 0)
{
- fprintf(out_hnd, "please use lsaquery first or specify a complete SID\n");
+ report(out_hnd, "please use lsaquery first or specify a complete SID\n");
return;
}
@@ -262,7 +260,7 @@ void cmd_lsa_lookup_sids(struct client_info *info)
if (num_sids == 0)
{
- fprintf(out_hnd, "lookupsid RID or SID\n");
+ report(out_hnd, "lookupsid RID or SID\n");
return;
}
@@ -295,11 +293,11 @@ void cmd_lsa_lookup_sids(struct client_info *info)
}
if (names != NULL)
{
- fprintf(out_hnd,"Lookup SIDS:\n");
+ report(out_hnd, "Lookup SIDS:\n");
for (i = 0; i < num_names; i++)
{
sid_to_string(temp, sids[i]);
- fprintf(out_hnd, "SID: %s -> %s\n", temp, names[i]);
+ report(out_hnd, "SID: %s -> %s\n", temp, names[i]);
if (names[i] != NULL)
{
free(names[i]);
@@ -329,7 +327,7 @@ void cmd_lsa_query_secret(struct client_info *info)
if (!next_token(NULL, secret_name, NULL, sizeof(secret_name)))
{
- fprintf(out_hnd, "querysecret <secret name>\n");
+ report(out_hnd, "querysecret <secret name>\n");
return;
}
@@ -350,7 +348,7 @@ void cmd_lsa_query_secret(struct client_info *info)
/* lookup domain controller; receive a policy handle */
res1 = res ? lsa_open_secret(smb_cli, nt_pipe_fnum,
&info->dom.lsa_info_pol,
- secret_name, 0x20003, &hnd_secret) : False;
+ secret_name, 0xf003f, &hnd_secret) : False;
res2 = res1 ? lsa_query_secret(smb_cli, nt_pipe_fnum,
&hnd_secret, &enc_secret, &last_update) : False;
@@ -364,18 +362,18 @@ void cmd_lsa_query_secret(struct client_info *info)
if (res2 && nt_decrypt_string2(&secret, &enc_secret, smb_cli->pwd.smb_nt_pwd))
{
- fprintf(out_hnd, "\tValue : ");
+ report(out_hnd, "\tValue : ");
for (i = 0; i < secret.str_str_len; i++)
{
- fprintf(out_hnd, "%02X", secret.buffer[i]);
+ report(out_hnd, "%02X", secret.buffer[i]);
}
- fprintf(out_hnd, "\n\tLast Updated: %s\n\n",
+ report(out_hnd, "\n\tLast Updated: %s\n\n",
http_timestring(nt_time_to_unix(&last_update)));
}
else
{
- fprintf(out_hnd, "LSA Query Secret: failed\n");
+ report(out_hnd, "LSA Query Secret: failed\n");
}
}
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 13dd932a57..e9fb230624 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -778,7 +778,6 @@ void smbd_process(void)
{
extern fstring remote_machine;
extern fstring local_machine;
- char *s;
fstrcpy(remote_machine, dns_to_netbios_name(client_name(Client)));
fstrcpy(local_machine, global_myname);