s3-lib: Fix util_cmdline which doesn't use popt.
[nivanova/samba-autobuild/.git] / source3 / include / popt_common.h
index 9e5503f2701f09b368edd063c8df09a15d85ff6c..2125ed6f83afb1823685073e37ba24b1a520f549 100644 (file)
@@ -21,6 +21,7 @@
 #define _POPT_COMMON_H
 
 #include <popt.h>
+#include "auth_info.h"
 
 /* Common popt structures */
 extern struct poptOption popt_common_samba[];
@@ -28,6 +29,8 @@ extern struct poptOption popt_common_connection[];
 extern struct poptOption popt_common_configfile[];
 extern struct poptOption popt_common_version[];
 extern struct poptOption popt_common_credentials[];
+extern struct poptOption popt_common_debuglevel[];
+extern struct poptOption popt_common_option[];
 extern const struct poptOption popt_common_dynconfig[];
 
 #ifndef POPT_TABLEEND
@@ -40,16 +43,11 @@ extern const struct poptOption popt_common_dynconfig[];
 #define POPT_COMMON_CONFIGFILE { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile, 0, "Common samba config:", NULL },
 #define POPT_COMMON_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL },
 #define POPT_COMMON_DYNCONFIG { NULL, 0, POPT_ARG_INCLUDE_TABLE, \
-    CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \
+    discard_const_p(poptOption, popt_common_dynconfig), 0, \
     "Build-time configuration overrides:", NULL },
+#define POPT_COMMON_DEBUGLEVEL { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debuglevel, 0, "Common samba debugging:", NULL },
+#define POPT_COMMON_OPTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_option, 0, "Common samba commandline config:", NULL },
 
-struct user_auth_info {
-       char *username;
-       char *password;
-       bool got_pass;
-       bool use_kerberos;
-       int signing_state;
-       bool smb_encrypt;
-};
+void popt_common_set_auth_info(struct user_auth_info *auth_info);
 
 #endif /* _POPT_COMMON_H */