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
#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;
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;
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;
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)
{
#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;
#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)
{
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;
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();
}
-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;
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)
{
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;
}
-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;
#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)
{
}
/* 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,
NULL
};
-struct IStream_vtable simple_IStream_vtable = {
+static struct IStream_vtable simple_IStream_vtable = {
{},
simple_IUnknown_QueryInterface,
simple_IUnknown_AddRef,
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);
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
*/
int max_valdatalen;
};
-struct {
+static struct {
uint32_t hkey;
WERROR (*open) (struct dcerpc_pipe *p, TALLOC_CTX *, struct policy_handle *h);
} known_hives[] = {
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}
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;
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,
/* 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,
/*
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) {
/*
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;
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);
/* 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();
}
-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 =
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);
}
}
-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;
#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;
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;
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;
}
-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)
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,
}
-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,
return True;
}
-/*
- 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
*/
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);