mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
s4: popt: Add set/get/free functions for cmdline_credentials.
Preparing to make this static instead of a global. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
560c37524b
commit
dd4a3ce927
@ -39,6 +39,22 @@
|
||||
enum {OPT_OPTION=1,OPT_LEAK_REPORT,OPT_LEAK_REPORT_FULL,OPT_DEBUG_STDERR};
|
||||
|
||||
struct cli_credentials *cmdline_credentials = NULL;
|
||||
|
||||
void popt_set_cmdline_credentials(struct cli_credentials *creds)
|
||||
{
|
||||
cmdline_credentials = creds;
|
||||
}
|
||||
|
||||
struct cli_credentials *popt_get_cmdline_credentials(void)
|
||||
{
|
||||
return cmdline_credentials;
|
||||
}
|
||||
|
||||
void popt_free_cmdline_credentials(void)
|
||||
{
|
||||
TALLOC_FREE(cmdline_credentials);
|
||||
}
|
||||
|
||||
struct loadparm_context *cmdline_lp_ctx = NULL;
|
||||
|
||||
static void popt_version_callback(poptContext con,
|
||||
|
@ -38,6 +38,9 @@ extern struct poptOption popt_common_credentials4[];
|
||||
#define POPT_COMMON_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials4, 0, "Authentication options:", NULL },
|
||||
|
||||
extern struct cli_credentials *cmdline_credentials;
|
||||
void popt_set_cmdline_credentials(struct cli_credentials *creds);
|
||||
struct cli_credentials *popt_get_cmdline_credentials(void);
|
||||
void popt_free_cmdline_credentials(void);
|
||||
extern struct loadparm_context *cmdline_lp_ctx;
|
||||
|
||||
#endif /* _POPT_COMMON_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user