mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:winbind: Move functions to enable or disable cache to winbindd-lib subsystem
The source3/winbindd/winbindd.c file does not belong to 'winbindd-lib' subsystem. Funtions called from winbindd-lib must be part of it. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
efcaeff2c3
commit
321c51e14a
@ -62,7 +62,6 @@ static bool client_is_idle(struct winbindd_cli_state *state);
|
||||
static void remove_client(struct winbindd_cli_state *state);
|
||||
static void winbindd_setup_max_fds(void);
|
||||
|
||||
static bool opt_nocache = False;
|
||||
static bool interactive = False;
|
||||
|
||||
struct imessaging_context *winbind_imessaging_context(void)
|
||||
@ -1367,16 +1366,6 @@ failed:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool winbindd_use_idmap_cache(void)
|
||||
{
|
||||
return !opt_nocache;
|
||||
}
|
||||
|
||||
bool winbindd_use_cache(void)
|
||||
{
|
||||
return !opt_nocache;
|
||||
}
|
||||
|
||||
static void winbindd_register_handlers(struct messaging_context *msg_ctx,
|
||||
bool foreground)
|
||||
{
|
||||
@ -1666,7 +1655,7 @@ int main(int argc, const char **argv)
|
||||
while ((opt = poptGetNextOpt(pc)) != -1) {
|
||||
switch (opt) {
|
||||
case 'n':
|
||||
opt_nocache = true;
|
||||
winbindd_set_use_cache(false);
|
||||
break;
|
||||
default:
|
||||
d_fprintf(stderr, "\nInvalid option %s: %s\n\n",
|
||||
|
@ -59,6 +59,8 @@ extern struct winbindd_methods sam_passdb_methods;
|
||||
|
||||
static void wcache_flush_cache(void);
|
||||
|
||||
static bool opt_nocache = False;
|
||||
|
||||
/*
|
||||
* JRA. KEEP THIS LIST UP TO DATE IF YOU ADD CACHE ENTRIES.
|
||||
* Here are the list of entry types that are *not* stored
|
||||
@ -72,6 +74,21 @@ static const char *non_centry_keys[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
bool winbindd_use_idmap_cache(void)
|
||||
{
|
||||
return !opt_nocache;
|
||||
}
|
||||
|
||||
bool winbindd_use_cache(void)
|
||||
{
|
||||
return !opt_nocache;
|
||||
}
|
||||
|
||||
void winbindd_set_use_cache(bool use_cache)
|
||||
{
|
||||
opt_nocache = !use_cache;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Is this key a non-centry type ?
|
||||
************************************************************************/
|
||||
|
@ -30,6 +30,7 @@ bool winbindd_setup_stdin_handler(bool parent, bool foreground);
|
||||
bool winbindd_setup_sig_hup_handler(const char *lfile);
|
||||
bool winbindd_use_idmap_cache(void);
|
||||
bool winbindd_use_cache(void);
|
||||
void winbindd_set_use_cache(bool use_cache);
|
||||
char *get_winbind_priv_pipe_dir(void);
|
||||
void winbindd_flush_caches(void);
|
||||
bool winbindd_reload_services_file(const char *lfile);
|
||||
|
Loading…
Reference in New Issue
Block a user