mirror of
https://github.com/samba-team/samba.git
synced 2025-11-05 04:23:51 +03:00
r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
08bb1ef643
commit
0bcb21ed74
@@ -1229,7 +1229,9 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
|
||||
return NT_STATUS_FOOBAR;
|
||||
}
|
||||
|
||||
principal_string = talloc_strndup(mem_ctx, name_token.value, name_token.length);
|
||||
principal_string = talloc_strndup(mem_ctx,
|
||||
(const char *)name_token.value,
|
||||
name_token.length);
|
||||
|
||||
gss_release_buffer(&min_stat, &name_token);
|
||||
|
||||
|
||||
@@ -3045,10 +3045,10 @@ static struct smbclient_context *do_connect(TALLOC_CTX *mem_ctx,
|
||||
/****************************************************************************
|
||||
handle a -L query
|
||||
****************************************************************************/
|
||||
static int do_host_query(const char *query_host)
|
||||
static int do_host_query(const char *query_host, const char *workgroup)
|
||||
{
|
||||
browse_host(query_host);
|
||||
list_servers(lp_workgroup());
|
||||
list_servers(workgroup);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -3209,7 +3209,7 @@ static int do_message_op(const char *desthost, const char *destip, int name_type
|
||||
}
|
||||
|
||||
if (query_host) {
|
||||
return do_host_query(query_host);
|
||||
return do_host_query(query_host, lp_workgroup());
|
||||
}
|
||||
|
||||
if (message) {
|
||||
|
||||
@@ -407,15 +407,14 @@ static const struct stream_server_ops kpasswdd_tcp_stream_ops = {
|
||||
/*
|
||||
start listening on the given address
|
||||
*/
|
||||
static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address)
|
||||
static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address,
|
||||
uint16_t kdc_port, uint16_t kpasswd_port)
|
||||
{
|
||||
const struct model_ops *model_ops;
|
||||
struct kdc_socket *kdc_socket;
|
||||
struct kdc_socket *kpasswd_socket;
|
||||
struct socket_address *kdc_address, *kpasswd_address;
|
||||
NTSTATUS status;
|
||||
uint16_t kdc_port = lp_krb5_port();
|
||||
uint16_t kpasswd_port = lp_kpasswd_port();
|
||||
|
||||
kdc_socket = talloc(kdc, struct kdc_socket);
|
||||
NT_STATUS_HAVE_NO_MEMORY(kdc_socket);
|
||||
@@ -526,7 +525,8 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc)
|
||||
|
||||
for (i=0; i<num_interfaces; i++) {
|
||||
const char *address = talloc_strdup(tmp_ctx, iface_n_ip(i));
|
||||
status = kdc_add_socket(kdc, address);
|
||||
status = kdc_add_socket(kdc, address, lp_krb5_port(),
|
||||
lp_kpasswd_port());
|
||||
NT_STATUS_NOT_OK_RETURN(status);
|
||||
}
|
||||
|
||||
|
||||
@@ -538,7 +538,8 @@ static void ldapsrv_task_init(struct task_server *task)
|
||||
if (!NT_STATUS_IS_OK(status)) goto failed;
|
||||
}
|
||||
} else {
|
||||
status = add_socket(task->event_ctx, model_ops, lp_socket_address(), ldap_service);
|
||||
status = add_socket(task->event_ctx, model_ops,
|
||||
lp_socket_address(), ldap_service);
|
||||
if (!NT_STATUS_IS_OK(status)) goto failed;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ static WERROR reg_dotreg_diff_del_value(void *_data, const char *path, const cha
|
||||
|
||||
static WERROR reg_dotreg_diff_done(void *_data)
|
||||
{
|
||||
struct dotreg_data *data = _data;
|
||||
struct dotreg_data *data = (struct dotreg_data *)_data;
|
||||
|
||||
close(data->fd);
|
||||
talloc_free(data);
|
||||
|
||||
@@ -62,7 +62,8 @@ static void continue_one(struct composite_context *creq);
|
||||
/*
|
||||
setup an async socket_connect, with multiple ports
|
||||
*/
|
||||
_PUBLIC_ struct composite_context *socket_connect_multi_send(TALLOC_CTX *mem_ctx,
|
||||
_PUBLIC_ struct composite_context *socket_connect_multi_send(
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *server_address,
|
||||
int num_server_ports,
|
||||
uint16_t *server_ports,
|
||||
|
||||
@@ -238,7 +238,7 @@ static void usage(void)
|
||||
|
||||
unlink("torture.tdb");
|
||||
|
||||
pids = calloc(sizeof(pid_t), num_procs);
|
||||
pids = (pid_t *)calloc(sizeof(pid_t), num_procs);
|
||||
pids[0] = getpid();
|
||||
|
||||
for (i=0;i<num_procs-1;i++) {
|
||||
|
||||
@@ -66,7 +66,8 @@ struct nbt_name_request *nbt_name_refresh_send(struct nbt_name_socket *nbtsock,
|
||||
packet->additional[0].rdata.netbios.addresses[0].ipaddr =
|
||||
talloc_strdup(packet->additional, io->in.address);
|
||||
|
||||
dest = socket_address_from_strings(nbtsock, nbtsock->sock->backend_name,
|
||||
dest = socket_address_from_strings(nbtsock,
|
||||
nbtsock->sock->backend_name,
|
||||
io->in.dest_addr, lp_nbt_port());
|
||||
if (dest == NULL) goto failed;
|
||||
req = nbt_name_request_send(nbtsock, dest, packet,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smb.h"
|
||||
#include "libcli/raw/libcliraw.h"
|
||||
|
||||
/*
|
||||
work out how many bytes on the wire a ea list will consume.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smb.h"
|
||||
#include "libcli/raw/libcliraw.h"
|
||||
|
||||
/****************************************************************************
|
||||
lpq - async send
|
||||
|
||||
@@ -375,7 +375,7 @@ BOOL smbcli_transport_simple_set_signing(struct smbcli_transport *transport,
|
||||
}
|
||||
|
||||
|
||||
BOOL smbcli_init_signing(struct smbcli_transport *transport)
|
||||
bool smbcli_init_signing(struct smbcli_transport *transport)
|
||||
{
|
||||
transport->negotiate.sign_info.mac_key = data_blob(NULL, 0);
|
||||
if (!smbcli_set_signing_off(&transport->negotiate.sign_info)) {
|
||||
|
||||
@@ -188,7 +188,8 @@ NTSTATUS resolve_name_recv(struct composite_context *c,
|
||||
NTSTATUS resolve_name(struct nbt_name *name, TALLOC_CTX *mem_ctx, const char **reply_addr,
|
||||
struct event_context *ev)
|
||||
{
|
||||
struct composite_context *c = resolve_name_send(name, ev, lp_name_resolve_order());
|
||||
struct composite_context *c = resolve_name_send(name, ev,
|
||||
lp_name_resolve_order());
|
||||
return resolve_name_recv(c, mem_ctx, reply_addr);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
/*
|
||||
wins name resolution method - async send
|
||||
*/
|
||||
struct composite_context *resolve_name_wins_send(TALLOC_CTX *mem_ctx,
|
||||
struct composite_context *resolve_name_wins_send(
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct event_context *event_ctx,
|
||||
struct nbt_name *name)
|
||||
{
|
||||
|
||||
@@ -144,7 +144,8 @@ static NTSTATUS libnet_samdump_fn(TALLOC_CTX *mem_ctx,
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, struct libnet_SamDump *r)
|
||||
NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
|
||||
struct libnet_SamDump *r)
|
||||
{
|
||||
NTSTATUS nt_status;
|
||||
struct libnet_SamSync r2;
|
||||
|
||||
@@ -1209,7 +1209,8 @@ NTSTATUS libnet_samsync_ldb(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, str
|
||||
state->secrets = NULL;
|
||||
state->trusted_domains = NULL;
|
||||
|
||||
state->sam_ldb = ldb_wrap_connect(mem_ctx, lp_sam_url(), r->in.session_info,
|
||||
state->sam_ldb = ldb_wrap_connect(mem_ctx, lp_sam_url(),
|
||||
r->in.session_info,
|
||||
ctx->cred, 0, NULL);
|
||||
|
||||
r2.out.error_string = NULL;
|
||||
|
||||
@@ -477,7 +477,8 @@ struct composite_context* dcerpc_pipe_open_tcp_send(struct dcerpc_connection *co
|
||||
s->conn = conn;
|
||||
|
||||
make_nbt_name_server(&name, server);
|
||||
resolve_req = resolve_name_send(&name, c->event_ctx, lp_name_resolve_order());
|
||||
resolve_req = resolve_name_send(&name, c->event_ctx,
|
||||
lp_name_resolve_order());
|
||||
composite_continue(c, resolve_req, continue_ip_resolve_name, c);
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ static const char *wins_hook_action_string(enum wins_hook_action action)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec, enum wins_hook_action action)
|
||||
void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec,
|
||||
enum wins_hook_action action)
|
||||
{
|
||||
const char *script = lp_wins_hook();
|
||||
uint32_t i, length;
|
||||
|
||||
@@ -223,8 +223,8 @@ static NTSTATUS wbsrv_samba3_push_reply(struct wbsrv_samba3_call *call, TALLOC_C
|
||||
uint8_t *extra_data;
|
||||
size_t extra_data_len = 0;
|
||||
|
||||
extra_data = call->response.extra_data.data;
|
||||
if (extra_data) {
|
||||
extra_data = (uint8_t *)call->response.extra_data.data;
|
||||
if (extra_data != NULL) {
|
||||
extra_data_len = call->response.length -
|
||||
sizeof(call->response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user