s4: popt: Add set/get/free functions for cmdline_credentials.
[bbaumbach/samba-autobuild/.git] / source4 / lib / cmdline / popt_common.c
index 25b02b446d0ca94d9a5baf4923b9737f8c783ce8..59f06e8ba2527962cddc4e93faac5f4ebef62c25 100644 (file)
 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,