summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/gensec/gensec_gssapi.c4
-rw-r--r--source4/client/client.c6
-rw-r--r--source4/client/smbmount.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c22
-rw-r--r--source4/kdc/kdc.c8
-rw-r--r--source4/ldap_server/ldap_server.c3
-rw-r--r--source4/lib/registry/patchfile_dotreg.c2
-rw-r--r--source4/lib/socket/connect_multi.c3
-rw-r--r--source4/lib/tdb/tools/tdbtorture.c2
-rw-r--r--source4/libcli/nbt/namerefresh.c3
-rw-r--r--source4/libcli/raw/raweas.c1
-rw-r--r--source4/libcli/raw/rawlpq.c1
-rw-r--r--source4/libcli/raw/smb_signing.c2
-rw-r--r--source4/libcli/resolve/resolve.c3
-rw-r--r--source4/libcli/resolve/wins.c7
-rw-r--r--source4/libnet/libnet_samdump.c3
-rw-r--r--source4/libnet/libnet_samsync_ldb.c3
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c3
-rw-r--r--source4/nbt_server/wins/wins_hook.c3
-rw-r--r--source4/winbind/wb_samba3_protocol.c4
20 files changed, 49 insertions, 36 deletions
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index 3c66a032d5..dd9f19ac43 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -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);
diff --git a/source4/client/client.c b/source4/client/client.c
index 1fdbec4bfd..0a3cb21752 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -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) {
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index f15b1f7030..7bd42b84cf 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -911,7 +911,7 @@ static void parse_mount_smb(int argc, char **argv)
DEBUG(3,("mount.smbfs started (version %s)\n", VERSION));
if (*workgroup == 0) {
- pstrcpy(workgroup,lp_workgroup());
+ pstrcpy(workgroup, lp_workgroup());
}
if (!*my_netbios_name) {
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 98061570c8..a275810b12 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -340,17 +340,17 @@ static int setup_primary_kerberos(struct setup_password_fields_io *io,
return LDB_ERR_OPERATIONS_ERROR;
}
-if (lp_parm_bool(-1, "password_hash", "create_aes_key", false)) {
-/*
- * TODO:
- *
- * w2k and w2k3 doesn't support AES, so we'll not include
- * the AES key here yet.
- *
- * Also we don't have an example supplementalCredentials blob
- * from Windows Longhorn Server with AES support
- *
- */
+ if (lp_parm_bool(-1, "password_hash", "create_aes_key", false)) {
+ /*
+ * TODO:
+ *
+ * w2k and w2k3 doesn't support AES, so we'll not include
+ * the AES key here yet.
+ *
+ * Also we don't have an example supplementalCredentials blob
+ * from Windows Longhorn Server with AES support
+ *
+ */
/*
* create ENCTYPE_AES256_CTS_HMAC_SHA1_96 key out of
* the salt and the cleartext password
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index c58f738243..f26e5a7e9b 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -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);
}
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 0de76052d1..2ea1a96ae7 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -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;
}
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index 32b70d2144..85cf8ab251 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -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);
diff --git a/source4/lib/socket/connect_multi.c b/source4/lib/socket/connect_multi.c
index 76e5034a58..6bf7ca4d3e 100644
--- a/source4/lib/socket/connect_multi.c
+++ b/source4/lib/socket/connect_multi.c
@@ -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,
diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c
index 14a2b48cdc..ca71c736ad 100644
--- a/source4/lib/tdb/tools/tdbtorture.c
+++ b/source4/lib/tdb/tools/tdbtorture.c
@@ -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++) {
diff --git a/source4/libcli/nbt/namerefresh.c b/source4/libcli/nbt/namerefresh.c
index a60e54ed6a..afa80d68f8 100644
--- a/source4/libcli/nbt/namerefresh.c
+++ b/source4/libcli/nbt/namerefresh.c
@@ -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,
diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c
index f79de88fa6..06b5b4fc4d 100644
--- a/source4/libcli/raw/raweas.c
+++ b/source4/libcli/raw/raweas.c
@@ -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.
diff --git a/source4/libcli/raw/rawlpq.c b/source4/libcli/raw/rawlpq.c
index 03f7a82f1c..46e0efaaf5 100644
--- a/source4/libcli/raw/rawlpq.c
+++ b/source4/libcli/raw/rawlpq.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "smb.h"
+#include "libcli/raw/libcliraw.h"
/****************************************************************************
lpq - async send
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index 99044d23ae..a37c9a7836 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -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)) {
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index 63598fdd00..ee9b8df148 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -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);
}
diff --git a/source4/libcli/resolve/wins.c b/source4/libcli/resolve/wins.c
index 7af12075a1..f7bfdc3405 100644
--- a/source4/libcli/resolve/wins.c
+++ b/source4/libcli/resolve/wins.c
@@ -26,9 +26,10 @@
/*
wins name resolution method - async send
*/
-struct composite_context *resolve_name_wins_send(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
- struct nbt_name *name)
+struct composite_context *resolve_name_wins_send(
+ TALLOC_CTX *mem_ctx,
+ struct event_context *event_ctx,
+ struct nbt_name *name)
{
const char **address_list = lp_wins_server_list();
if (address_list == NULL) return NULL;
diff --git a/source4/libnet/libnet_samdump.c b/source4/libnet/libnet_samdump.c
index fb4267748a..fc671a9b48 100644
--- a/source4/libnet/libnet_samdump.c
+++ b/source4/libnet/libnet_samdump.c
@@ -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;
diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c
index 338b15d6d7..1947eadddc 100644
--- a/source4/libnet/libnet_samsync_ldb.c
+++ b/source4/libnet/libnet_samsync_ldb.c
@@ -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;
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index a28b21b5c3..6b47e439cf 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -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;
}
diff --git a/source4/nbt_server/wins/wins_hook.c b/source4/nbt_server/wins/wins_hook.c
index 15c0088192..e5d8b39062 100644
--- a/source4/nbt_server/wins/wins_hook.c
+++ b/source4/nbt_server/wins/wins_hook.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;
diff --git a/source4/winbind/wb_samba3_protocol.c b/source4/winbind/wb_samba3_protocol.c
index 9bf19ebf6e..f2c9763670 100644
--- a/source4/winbind/wb_samba3_protocol.c
+++ b/source4/winbind/wb_samba3_protocol.c
@@ -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);
}