diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-05-15 20:16:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:44 -0500 |
commit | 5b18cf22680c76abb1262a6b75a30b8a37899467 (patch) | |
tree | b845941a1bac81eceaba11c7f885735e1ace20e2 /source4 | |
parent | 51b0f62b8f0d6350b7706c5b7fd52f856c2756de (diff) | |
download | samba-5b18cf22680c76abb1262a6b75a30b8a37899467.tar.gz samba-5b18cf22680c76abb1262a6b75a30b8a37899467.tar.bz2 samba-5b18cf22680c76abb1262a6b75a30b8a37899467.zip |
r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb89980bfe6dabd71264d570ea356ee5a22)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/kerberos/kerberos-notes.txt | 2 | ||||
-rw-r--r-- | source4/client/client.c | 4 | ||||
-rw-r--r-- | source4/gtk/common/select.c | 4 | ||||
-rw-r--r-- | source4/gtk/tools/gepdump.c | 4 | ||||
-rw-r--r-- | source4/gtk/tools/gregedit.c | 20 | ||||
-rw-r--r-- | source4/gtk/tools/gwcrontab.c | 34 | ||||
-rw-r--r-- | source4/gtk/tools/gwsam.c | 35 | ||||
-rw-r--r-- | source4/lib/com/classes/simple.c | 8 | ||||
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 7 | ||||
-rw-r--r-- | source4/lib/registry/common/reg_util.c | 38 | ||||
-rw-r--r-- | source4/lib/registry/reg_backend_rpc.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/tools/regpatch.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/tools/regshell.c | 2 | ||||
-rw-r--r-- | source4/lib/socket/socket.c | 6 | ||||
-rw-r--r-- | source4/lib/socket/socket.h | 1 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr.c | 4 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 2 | ||||
-rw-r--r-- | source4/passdb/secrets.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_sock.c | 6 | ||||
-rw-r--r-- | source4/torture/ldap/basic.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/netlogon.c | 6 | ||||
-rw-r--r-- | source4/torture/torture_util.c | 19 | ||||
-rw-r--r-- | source4/utils/ntlm_auth.c | 10 |
23 files changed, 65 insertions, 159 deletions
diff --git a/source4/auth/kerberos/kerberos-notes.txt b/source4/auth/kerberos/kerberos-notes.txt index a99fedb8f1..7eb59ccb40 100644 --- a/source4/auth/kerberos/kerberos-notes.txt +++ b/source4/auth/kerberos/kerberos-notes.txt @@ -37,7 +37,7 @@ GSSAPI layer requirements Welcome to the wonderful world of canonicalisation The Heimdal GSSAPI libs do not support kinit returning a different -relam to what the client asked for, even just in case differences. +realm to what the client asked for, even just in case differences. No idea on MIT diff --git a/source4/client/client.c b/source4/client/client.c index 27e29bfaad..5981812eb7 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -38,10 +38,10 @@ #define REGISTER 0 #endif -struct smbcli_state *cli; +static struct smbcli_state *cli; extern BOOL in_client; static int port = 0; -pstring cur_dir = "\\"; +static pstring cur_dir = "\\"; static pstring cd_path = ""; static pstring service; static pstring desthost; diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c index 6149182b80..61b9649657 100644 --- a/source4/gtk/common/select.c +++ b/source4/gtk/common/select.c @@ -31,7 +31,7 @@ const char *gtk_select_domain_dialog_get_domain(GtkSelectDomainDialog *d) return gtk_entry_get_text(GTK_ENTRY(d->entry_domain)); } -void gtk_select_domain_dialog_init (GtkSelectDomainDialog *select_domain_dialog) +static void gtk_select_domain_dialog_init (GtkSelectDomainDialog *select_domain_dialog) { GtkWidget *dialog_vbox1; GtkWidget *hbox1; @@ -184,7 +184,7 @@ const char *gtk_select_host_dialog_get_host (GtkSelectHostDialog *d) return gtk_entry_get_text(GTK_ENTRY(d->entry_host)); } -void gtk_select_host_dialog_init (GtkSelectHostDialog *select_host_dialog) +static void gtk_select_host_dialog_init (GtkSelectHostDialog *select_host_dialog) { GtkWidget *dialog_vbox2; GtkWidget *hbox2; diff --git a/source4/gtk/tools/gepdump.c b/source4/gtk/tools/gepdump.c index 33e91e1436..c5c1aa1af6 100644 --- a/source4/gtk/tools/gepdump.c +++ b/source4/gtk/tools/gepdump.c @@ -45,8 +45,8 @@ static GtkWidget *mnu_refresh; TALLOC_CTX *eps_ctx = NULL; TALLOC_CTX *conn_ctx = NULL; -struct dcerpc_pipe *epmapper_pipe; -struct dcerpc_pipe *mgmt_pipe; +static struct dcerpc_pipe *epmapper_pipe; +static struct dcerpc_pipe *mgmt_pipe; static void on_quit1_activate (GtkMenuItem *menuitem, gpointer user_data) { diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c index 5a9994df9c..9e81b0b86f 100644 --- a/source4/gtk/tools/gregedit.c +++ b/source4/gtk/tools/gregedit.c @@ -26,16 +26,16 @@ #include "gtk/common/select.h" #include "gtk/common/gtk-smb.h" -GtkTreeStore *store_keys; -GtkListStore *store_vals; -GtkWidget *tree_keys; -GtkWidget *tree_vals; -GtkWidget *mainwin; -GtkWidget *mnu_add_key, *mnu_set_value, *mnu_del_key, *mnu_del_value, *mnu_find; -TALLOC_CTX *mem_ctx; /* FIXME: Split up */ - -GtkWidget *save; -GtkWidget *save_as; +static GtkTreeStore *store_keys; +static GtkListStore *store_vals; +static GtkWidget *tree_keys; +static GtkWidget *tree_vals; +static GtkWidget *mainwin; +static GtkWidget *mnu_add_key, *mnu_set_value, *mnu_del_key, *mnu_del_value, *mnu_find; +static TALLOC_CTX *mem_ctx; /* FIXME: Split up */ + +static GtkWidget *save; +static GtkWidget *save_as; static GtkWidget* create_openfilewin (void); static GtkWidget* create_savefilewin (void); struct registry_context *registry = NULL; diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c index 2a8ee5049e..8cae7279a4 100644 --- a/source4/gtk/tools/gwcrontab.c +++ b/source4/gtk/tools/gwcrontab.c @@ -25,14 +25,14 @@ #include "gtk/common/select.h" #include "gtk/common/gtk-smb.h" -struct dcerpc_pipe *at_pipe = NULL; -GtkWidget *mainwin; -GtkListStore *store_jobs; -GtkWidget *tasks; -GtkWidget *entry_cmd; -GtkWidget *entry_repeat_weekly; -GtkWidget *entry_repeat_monthly; -GtkWidget *delete; +static struct dcerpc_pipe *at_pipe = NULL; +static GtkWidget *mainwin; +static GtkListStore *store_jobs; +static GtkWidget *tasks; +static GtkWidget *entry_cmd; +static GtkWidget *entry_repeat_weekly; +static GtkWidget *entry_repeat_monthly; +static GtkWidget *delete; void update_joblist(void) { @@ -74,16 +74,13 @@ void update_joblist(void) gtk_widget_set_sensitive(tasks, TRUE); } -static void on_job_select(GtkTreeSelection *sel, - gpointer data) +static void on_job_select(GtkTreeSelection *sel, gpointer data) { gtk_widget_set_sensitive(delete, gtk_tree_selection_get_selected(sel, NULL, NULL)); } -static void -on_connect_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_connect_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkRpcBindingDialog *d; NTSTATUS status; @@ -128,9 +125,7 @@ on_connect_activate (GtkMenuItem *menuitem, update_joblist(); } -void -on_quit_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_quit_activate(GtkMenuItem *menuitem, gpointer user_data) { talloc_free(at_pipe); gtk_main_quit(); @@ -215,17 +210,14 @@ on_delete_activate (GtkMenuItem *menuitem, } -void -on_about_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_about_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkDialog *aboutwin = GTK_DIALOG(create_gtk_samba_about_dialog("gwcrontab")); gtk_dialog_run(aboutwin); gtk_widget_destroy(GTK_WIDGET(aboutwin)); } -GtkWidget* -create_mainwindow (void) +static GtkWidget* create_mainwindow (void) { GtkWidget *mainwindow; GtkWidget *vbox; diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c index f712d43ba1..d64f786ef8 100644 --- a/source4/gtk/tools/gwsam.c +++ b/source4/gtk/tools/gwsam.c @@ -27,10 +27,10 @@ struct policy_handle sam_handle; struct dcerpc_pipe *sam_pipe = NULL; -struct policy_handle domain_handle; +static struct policy_handle domain_handle; GtkWidget *mainwin; GtkWidget *seldomain; -GtkWidget *mnu_disconnect; +static GtkWidget *mnu_disconnect; void update_grouplist(void) { @@ -78,16 +78,12 @@ void update_userlist(void) talloc_free(mem_ctx); } -void -on_new1_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_new1_activate(GtkMenuItem *menuitem, gpointer user_data) { } -void -on_select_domain_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_select_domain_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkSelectDomainDialog *d; gint result; @@ -192,50 +188,39 @@ static void on_account_activate(GtkMenuItem *menuitem, gpointer user_data) } -void -on_user_rights_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_user_rights_activate(GtkMenuItem *menuitem, gpointer user_data) { //FIXME } -void -on_audit_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_audit_activate(GtkMenuItem *menuitem, gpointer user_data) { //FIXME } -void -on_trust_relations_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_trust_relations_activate(GtkMenuItem *menuitem, gpointer user_data) { //FIXME } -void -on_refresh_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_refresh_activate(GtkMenuItem *menuitem, gpointer user_data) { update_userlist(); update_grouplist(); } -void -on_about_activate (GtkMenuItem *menuitem, - gpointer user_data) +static void on_about_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkDialog *aboutwin = GTK_DIALOG(create_gtk_samba_about_dialog("gwsam")); gtk_dialog_run(aboutwin); gtk_widget_destroy(GTK_WIDGET(aboutwin)); } -GtkWidget* -create_mainwindow (void) +static GtkWidget* create_mainwindow (void) { GtkWidget *vbox1; GtkWidget *mnu_connect; diff --git a/source4/lib/com/classes/simple.c b/source4/lib/com/classes/simple.c index ad03c17cce..e4bf8d18e1 100644 --- a/source4/lib/com/classes/simple.c +++ b/source4/lib/com/classes/simple.c @@ -22,8 +22,8 @@ #include "lib/com/com.h" #include "librpc/gen_ndr/com_dcom.h" -extern struct IClassFactory_vtable simple_classobject_vtable; -extern struct IStream_vtable simple_IStream_vtable; +static struct IClassFactory_vtable simple_classobject_vtable; +static struct IStream_vtable simple_IStream_vtable; static WERROR simple_IUnknown_QueryInterface (struct IUnknown *d, TALLOC_CTX *mem_ctx, struct GUID *iid, struct IUnknown **iun) { @@ -85,7 +85,7 @@ static uint32_t simpleclass_IUnknown_Release (struct IUnknown *d, TALLOC_CTX *me } /* Everything below this line should be autogenerated later on */ -struct IClassFactory_vtable simple_classobject_vtable = { +static struct IClassFactory_vtable simple_classobject_vtable = { {}, simpleclass_IUnknown_QueryInterface, simpleclass_IUnknown_AddRef, @@ -96,7 +96,7 @@ struct IClassFactory_vtable simple_classobject_vtable = { NULL }; -struct IStream_vtable simple_IStream_vtable = { +static struct IStream_vtable simple_IStream_vtable = { {}, simple_IUnknown_QueryInterface, simple_IUnknown_AddRef, diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index 407d0d3345..76de2f041f 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -127,13 +127,6 @@ WERROR reg_get_predefined_key_by_name(struct registry_context *ctx, const char * return WERR_BADFILE; } -WERROR reg_close (struct registry_context *ctx) -{ - talloc_free(ctx); - - return WERR_OK; -} - WERROR reg_get_predefined_key(struct registry_context *ctx, uint32_t hkey, struct registry_key **key) { WERROR ret = ctx->get_predefined_key(ctx, hkey, key); diff --git a/source4/lib/registry/common/reg_util.c b/source4/lib/registry/common/reg_util.c index d4fdc59d70..e12cff186a 100644 --- a/source4/lib/registry/common/reg_util.c +++ b/source4/lib/registry/common/reg_util.c @@ -139,44 +139,6 @@ BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *da return True; } -WERROR reg_key_get_subkey_val(TALLOC_CTX *mem_ctx, struct registry_key *key, const char *subname, const char *valname, struct registry_value **val) -{ - struct registry_key *k; - WERROR error = reg_key_get_subkey_by_name(mem_ctx, key, subname, &k); - if(!W_ERROR_IS_OK(error)) return error; - - return reg_key_get_value_by_name(mem_ctx, k, valname, val); -} - -/*********************************************************************** - Utility function for splitting the base path of a registry path off - by setting base and new_path to the apprapriate offsets withing the - path. - - WARNING!! Does modify the original string! - ***********************************************************************/ - -BOOL reg_split_path( char *path, char **base, char **new_path ) -{ - char *p; - - *new_path = *base = NULL; - - if ( !path) - return False; - - *base = path; - - p = strchr( path, '\\' ); - - if ( p ) { - *p = '\0'; - *new_path = p+1; - } - - return True; -} - /** * Replace all \'s with /'s */ diff --git a/source4/lib/registry/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc.c index 5240cf5696..88cce2584e 100644 --- a/source4/lib/registry/reg_backend_rpc.c +++ b/source4/lib/registry/reg_backend_rpc.c @@ -77,7 +77,7 @@ struct rpc_key_data { int max_valdatalen; }; -struct { +static struct { uint32_t hkey; WERROR (*open) (struct dcerpc_pipe *p, TALLOC_CTX *, struct policy_handle *h); } known_hives[] = { diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c index 2462fd8241..aeb418560d 100644 --- a/source4/lib/registry/tools/regpatch.c +++ b/source4/lib/registry/tools/regpatch.c @@ -576,7 +576,7 @@ typedef struct command_ops_s { int (*exec_cmd)(CMD *cmd); } CMD_OPS; -CMD_OPS default_cmd_ops[] = { +static CMD_OPS default_cmd_ops[] = { {0, regedit4_file_type, regedit4_get_cmd, regedit4_exec_cmd}, {1, editreg_1_0_file_type, editreg_1_0_get_cmd, editreg_1_0_exec_cmd}, {-1, NULL, NULL, NULL} diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index bb7533e55e..ecc2bfc7aa 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -187,7 +187,7 @@ static struct registry_key *cmd_exit(TALLOC_CTX *mem_ctx, struct registry_contex static struct registry_key *cmd_help(TALLOC_CTX *mem_ctx, struct registry_context *ctx,struct registry_key *, int, char **); -struct { +static struct { const char *name; const char *alias; const char *help; diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c index 86e2f05962..13d1640f51 100644 --- a/source4/lib/socket/socket.c +++ b/source4/lib/socket/socket.c @@ -87,12 +87,6 @@ NTSTATUS socket_create(const char *name, enum socket_type type, return socket_create_with_ops(NULL, ops, new_sock, type, flags); } -void socket_destroy(struct socket_context *sock) -{ - /* the close is handled by the destructor */ - talloc_free(sock); -} - NTSTATUS socket_connect(struct socket_context *sock, const char *my_address, int my_port, const char *server_address, int server_port, diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h index b1fae9ac56..bce64f9f6c 100644 --- a/source4/lib/socket/socket.h +++ b/source4/lib/socket/socket.h @@ -107,7 +107,6 @@ struct socket_context { /* prototypes */ NTSTATUS socket_create(const char *name, enum socket_type type, struct socket_context **new_sock, uint32_t flags); -void socket_destroy(struct socket_context *sock); NTSTATUS socket_connect(struct socket_context *sock, const char *my_address, int my_port, const char *server_address, int server_port, diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index b86cf0dd66..ce7efc4b11 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -90,7 +90,7 @@ NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size) /* set the parse offset to 'ofs' */ -NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs) +static NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs) { ndr->offset = ofs; if (ndr->offset > ndr->data_size) { @@ -185,7 +185,7 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size) /* set the push offset to 'ofs' */ -NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32_t ofs) +static NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32_t ofs) { NDR_CHECK(ndr_push_expand(ndr, ofs)); ndr->offset = ofs; diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 763ec55e50..1a0518888d 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -479,7 +479,7 @@ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *floor, struct GUID *uuid, u return status; } -DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, struct GUID *uuid, uint32_t if_version) +static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, struct GUID *uuid, uint32_t if_version) { struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx); diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c index 7bc7183b98..81e92b4da0 100644 --- a/source4/passdb/secrets.c +++ b/source4/passdb/secrets.c @@ -92,7 +92,7 @@ BOOL secrets_init(void) /* read a entry from the secrets database - the caller must free the result if size is non-null then the size of the entry is put in there */ -void *secrets_fetch(const char *key, size_t *size) +static void *secrets_fetch(const char *key, size_t *size) { TDB_DATA kbuf, dbuf; secrets_init(); diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c index d4d862140a..db709ac5e9 100644 --- a/source4/rpc_server/dcerpc_sock.c +++ b/source4/rpc_server/dcerpc_sock.c @@ -57,7 +57,7 @@ static void dcesrv_terminate_connection(struct dcesrv_connection *dce_conn, cons } -void dcesrv_sock_accept(struct stream_connection *srv_conn) +static void dcesrv_sock_accept(struct stream_connection *srv_conn) { NTSTATUS status; struct dcesrv_socket_context *dcesrv_sock = @@ -80,7 +80,7 @@ void dcesrv_sock_accept(struct stream_connection *srv_conn) return; } -void dcesrv_sock_recv(struct stream_connection *conn, uint16_t flags) +static void dcesrv_sock_recv(struct stream_connection *conn, uint16_t flags) { NTSTATUS status; struct dcesrv_connection *dce_conn = talloc_get_type(conn->private, struct dcesrv_connection); @@ -118,7 +118,7 @@ void dcesrv_sock_recv(struct stream_connection *conn, uint16_t flags) } } -void dcesrv_sock_send(struct stream_connection *conn, uint16_t flags) +static void dcesrv_sock_send(struct stream_connection *conn, uint16_t flags) { struct dcesrv_connection *dce_conn = talloc_get_type(conn->private, struct dcesrv_connection); NTSTATUS status; diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c index 7114aa2576..c0daefa99d 100644 --- a/source4/torture/ldap/basic.c +++ b/source4/torture/ldap/basic.c @@ -25,7 +25,7 @@ #include "libcli/ldap/ldap.h" #include "lib/cmdline/popt_common.h" -BOOL test_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password) +static BOOL test_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password) { NTSTATUS status; BOOL ret = True; @@ -38,7 +38,7 @@ BOOL test_bind_simple(struct ldap_connection *conn, const char *userdn, const ch return ret; } -BOOL test_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds) +static BOOL test_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds) { NTSTATUS status; BOOL ret = True; @@ -53,7 +53,7 @@ BOOL test_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds) return ret; } -BOOL test_multibind(struct ldap_connection *conn, const char *userdn, const char *password) +static BOOL test_multibind(struct ldap_connection *conn, const char *userdn, const char *password) { BOOL ret = True; diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index de0649d17b..14353ff590 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -74,7 +74,7 @@ static BOOL test_LogonUasLogoff(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) } -BOOL test_SetupCredentials(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, +static BOOL test_SetupCredentials(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *machine_name, const char *plain_pass, struct creds_CredentialState **creds_out) @@ -136,7 +136,7 @@ BOOL test_SetupCredentials(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return True; } -BOOL test_SetupCredentials2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, +static BOOL test_SetupCredentials2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint32_t negotiate_flags, const char *machine_name, const char *plain_pass, @@ -205,7 +205,7 @@ BOOL test_SetupCredentials2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } -BOOL test_SetupCredentials3(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, +static BOOL test_SetupCredentials3(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint32_t negotiate_flags, const char *machine_name, const char *plain_pass, diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c index c1e35cf3ef..e474c06c6b 100644 --- a/source4/torture/torture_util.c +++ b/source4/torture/torture_util.c @@ -291,25 +291,6 @@ BOOL split_unc_name(const char *unc, char **server, char **share) } /* - split a USER%PASS pair into username and password -*/ -BOOL split_username(const char *pair, char **user, char **pass) -{ - char *p = strdup(pair); - if (!p) return False; - - (*user) = p; - - p = strchr(*user, '%'); - if (!p) return False; - - *p = 0; - (*pass) = p+1; - - return True; -} - -/* set a attribute on a file */ BOOL torture_set_file_attribute(struct smbcli_tree *tree, const char *fname, uint16_t attrib) diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index 3bc479e061..4c7286a4c1 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -86,11 +86,11 @@ static const struct { extern int winbindd_fd; -const char *opt_username; -const char *opt_domain; -const char *opt_workstation; -const char *opt_password; -int opt_multiplex; +static const char *opt_username; +static const char *opt_domain; +static const char *opt_workstation; +static const char *opt_password; +static int opt_multiplex; static void mux_printf(unsigned int mux_id, const char *format, ...) PRINTF_ATTRIBUTE(2, 3); |