s3: popt: Add utility functions popt_get_cmdline_auth_info(), popt_free_cmdline_auth_...
authorJeremy Allison <jra@samba.org>
Wed, 26 Apr 2017 00:01:25 +0000 (17:01 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 9 May 2017 07:56:09 +0000 (09:56 +0200)
Leave the global cmdline_auth_info still exposed, we will make it static
once the users have been converted to the utility functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/include/popt_common.h
source3/lib/popt_common.c

index 2abfa04095c3b672899e839aa1f9eebd934687a7..f859db40449e42d6ad038b28ed6f40dda848e53d 100644 (file)
@@ -49,6 +49,8 @@ extern const struct poptOption popt_common_dynconfig[];
 #define POPT_COMMON_OPTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_option, 0, "Common samba commandline config:", NULL },
 
 extern struct user_auth_info *cmdline_auth_info;
+struct user_auth_info *popt_get_cmdline_auth_info(void);
+void popt_free_cmdline_auth_info(void);
 
 void popt_common_credentials_set_ignore_missing_conf(void);
 void popt_common_credentials_set_delay_post(void);
index 538c848d23515b7d1cb4cd173c65b8da3209151e..56da91c0600c72becef2599910f20a61e9cb8c69 100644 (file)
@@ -222,6 +222,16 @@ struct poptOption popt_common_option[] = {
  */
 
 struct user_auth_info *cmdline_auth_info;
+
+struct user_auth_info *popt_get_cmdline_auth_info(void)
+{
+       return cmdline_auth_info;
+}
+void popt_free_cmdline_auth_info(void)
+{
+       TALLOC_FREE(cmdline_auth_info);
+}
+
 static bool popt_common_credentials_ignore_missing_conf;
 static bool popt_common_credentials_delay_post;