Author: jelmer Date: 2007-09-08 13:34:42 +0000 (Sat, 08 Sep 2007) New Revision: 25028
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25028 Log: Fix more warnings. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/client/cifsddio.c branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.h branches/SAMBA_4_0/source/librpc/tools/ndrdump.c branches/SAMBA_4_0/source/param/config.mk branches/SAMBA_4_0/source/param/secrets.h branches/SAMBA_4_0/source/rpc_server/service_rpc.c branches/SAMBA_4_0/source/smbd/pidfile.c branches/SAMBA_4_0/source/smbd/server.c Changeset: Property changes on: branches/SAMBA_4_0 ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/client/cifsddio.c =================================================================== --- branches/SAMBA_4_0/source/client/cifsddio.c 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/client/cifsddio.c 2007-09-08 13:34:42 UTC (rev 25028) @@ -149,16 +149,14 @@ #define IO_HANDLE_TO_SMB(h) ((struct cifs_handle *)(h)) -BOOL smb_seek_func(void * handle, uint64_t offset) +static bool smb_seek_func(void * handle, uint64_t offset) { IO_HANDLE_TO_SMB(handle)->offset = offset; return(True); } -BOOL smb_read_func(void * handle, - uint8_t * buf, - uint64_t wanted, - uint64_t * actual) +static bool smb_read_func(void * handle, uint8_t * buf, uint64_t wanted, + uint64_t * actual) { NTSTATUS ret; union smb_read r; @@ -193,10 +191,8 @@ return(True); } -BOOL smb_write_func(void * handle, - uint8_t * buf, - uint64_t wanted, - uint64_t * actual) +static bool smb_write_func(void * handle, uint8_t * buf, uint64_t wanted, + uint64_t * actual) { NTSTATUS ret; union smb_write w; Modified: branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c =================================================================== --- branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c 2007-09-08 13:34:42 UTC (rev 25028) @@ -232,7 +232,7 @@ return s; } -static unsigned int socket_wrapper_default_iface(void) +unsigned int socket_wrapper_default_iface(void) { const char *s = getenv("SOCKET_WRAPPER_DEFAULT_IFACE"); if (s) { Modified: branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.h =================================================================== --- branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.h 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.h 2007-09-08 13:34:42 UTC (rev 25028) @@ -37,6 +37,7 @@ #define __SOCKET_WRAPPER_H__ const char *socket_wrapper_dir(void); +unsigned int socket_wrapper_default_iface(void); int swrap_socket(int family, int type, int protocol); int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen); int swrap_connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen); @@ -131,4 +132,5 @@ #define close(s) swrap_close(s) #endif + #endif /* __SOCKET_WRAPPER_H__ */ Modified: branches/SAMBA_4_0/source/librpc/tools/ndrdump.c =================================================================== --- branches/SAMBA_4_0/source/librpc/tools/ndrdump.c 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/librpc/tools/ndrdump.c 2007-09-08 13:34:42 UTC (rev 25028) @@ -87,10 +87,10 @@ while((num_read = read(STDIN_FILENO, buf, 255)) > 0) { if (result) { - result = (char *) talloc_realloc( - mem_ctx, result, char *, total_len + num_read); + result = talloc_realloc( + mem_ctx, result, char, total_len + num_read); } else { - result = talloc_size(mem_ctx, num_read); + result = talloc_array(mem_ctx, char, num_read); } memcpy(result + total_len, buf, num_read); @@ -104,7 +104,7 @@ return result; } -const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, const char *pipe_name) +static const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, const char *pipe_name) { const struct ndr_interface_table *p; void *handle; @@ -117,7 +117,7 @@ } symbol = talloc_asprintf(NULL, "ndr_table_%s", pipe_name); - p = dlsym(handle, symbol); + p = (const struct ndr_interface_table *)dlsym(handle, symbol); if (!p) { printf("%s: Unable to find DCE/RPC interface table for '%s': %s\n", plugin, pipe_name, dlerror()); Modified: branches/SAMBA_4_0/source/param/config.mk =================================================================== --- branches/SAMBA_4_0/source/param/config.mk 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/param/config.mk 2007-09-08 13:34:42 UTC (rev 25028) @@ -46,6 +46,5 @@ ################################################ [SUBSYSTEM::SECRETS] -PRIVATE_PROTO_HEADER = secrets_proto.h OBJ_FILES = secrets.o PRIVATE_DEPENDENCIES = DB_WRAP UTIL_TDB Modified: branches/SAMBA_4_0/source/param/secrets.h =================================================================== --- branches/SAMBA_4_0/source/param/secrets.h 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/param/secrets.h 2007-09-08 13:34:42 UTC (rev 25028) @@ -34,6 +34,19 @@ #define SECRETS_KRBTGT_SEARCH "(&((|(realm=%s)(flatname=%s))(samAccountName=krbtgt)))" #define SECRETS_PRINCIPAL_SEARCH "(&(|(realm=%s)(flatname=%s))(servicePrincipalName=%s))" -#include "param/secrets_proto.h" +/** + * Use a TDB to store an incrementing random seed. + * + * Initialised to the current pid, the very first time Samba starts, + * and incremented by one each time it is needed. + * + * @note Not called by systems with a working /dev/urandom. + */ +void secrets_shutdown(void); +bool secrets_init(void); +struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx); +struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx, + const char *domain); + #endif /* _SECRETS_H */ Modified: branches/SAMBA_4_0/source/rpc_server/service_rpc.c =================================================================== --- branches/SAMBA_4_0/source/rpc_server/service_rpc.c 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/rpc_server/service_rpc.c 2007-09-08 13:34:42 UTC (rev 25028) @@ -216,7 +216,7 @@ -NTSTATUS dcesrv_add_ep_unix(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, +static NTSTATUS dcesrv_add_ep_unix(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, struct event_context *event_ctx, const struct model_ops *model_ops) { struct dcesrv_socket_context *dcesrv_sock; @@ -241,7 +241,7 @@ return status; } -NTSTATUS dcesrv_add_ep_ncalrpc(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, +static NTSTATUS dcesrv_add_ep_ncalrpc(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, struct event_context *event_ctx, const struct model_ops *model_ops) { struct dcesrv_socket_context *dcesrv_sock; @@ -309,7 +309,7 @@ return status; } -NTSTATUS dcesrv_add_ep_np(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, +static NTSTATUS dcesrv_add_ep_np(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, struct event_context *event_ctx, const struct model_ops *model_ops) { NTSTATUS status; @@ -356,7 +356,7 @@ return status; } -NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, +static NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, struct event_context *event_ctx, const struct model_ops *model_ops) { NTSTATUS status; @@ -379,7 +379,7 @@ } -NTSTATUS dcesrv_add_ep(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, +static NTSTATUS dcesrv_add_ep(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e, struct event_context *event_ctx, const struct model_ops *model_ops) { switch (e->ep_description->transport) { Modified: branches/SAMBA_4_0/source/smbd/pidfile.c =================================================================== --- branches/SAMBA_4_0/source/smbd/pidfile.c 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/smbd/pidfile.c 2007-09-08 13:34:42 UTC (rev 25028) @@ -22,6 +22,7 @@ #include "includes.h" #include "system/filesys.h" #include "param/param.h" +#include "smbd/pidfile.h" /** * @file Modified: branches/SAMBA_4_0/source/smbd/server.c =================================================================== --- branches/SAMBA_4_0/source/smbd/server.c 2007-09-08 13:27:14 UTC (rev 25027) +++ branches/SAMBA_4_0/source/smbd/server.c 2007-09-08 13:34:42 UTC (rev 25028) @@ -153,7 +153,7 @@ static void server_stdin_handler(struct event_context *event_ctx, struct fd_event *fde, uint16_t flags, void *private) { - const char *binary_name = private; + const char *binary_name = (const char *)private; uint8_t c; if (read(0, &c, 1) == 0) { DEBUG(0,("%s: EOF on stdin - terminating\n", binary_name)); @@ -169,10 +169,11 @@ /* die if the user selected maximum runtime is exceeded */ -_NORETURN_ static void max_runtime_handler(struct event_context *ev, struct timed_event *te, - struct timeval t, void *private) +_NORETURN_ static void max_runtime_handler(struct event_context *ev, + struct timed_event *te, + struct timeval t, void *private) { - const char *binary_name = private; + const char *binary_name = (const char *)private; DEBUG(0,("%s: maximum runtime exceeded - terminating\n", binary_name)); exit(0); }