Go to the documentation of this file.
66 #define USER_PASS_LEN 4096
68 #define USER_PASS_LEN 128
75 #ifdef ENABLE_MANAGEMENT
80 #define CR_ECHO (1<<0)
81 #define CR_RESPONSE (1<<1)
93 #define SC_ECHO (1<<0)
107 #define GET_USER_PASS_MANAGEMENT (1<<0)
109 #define GET_USER_PASS_PASSWORD_ONLY (1<<2)
110 #define GET_USER_PASS_NEED_OK (1<<3)
111 #define GET_USER_PASS_NOFATAL (1<<4)
112 #define GET_USER_PASS_NEED_STR (1<<5)
113 #define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6)
115 #define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)
116 #define GET_USER_PASS_STATIC_CHALLENGE (1<<8)
117 #define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)
119 #define GET_USER_PASS_INLINE_CREDS (1<<10)
132 const char *auth_file,
134 const unsigned int flags,
148 const char *auth_file,
150 const unsigned int flags)
194 #ifdef ENABLE_IPROUTE
195 extern const char *iproute_path;
210 #define _STRINGIFY(S) #S
212 #define MAC_FMT _STRINGIFY(%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx)
214 #define MAC_PRINT_ARG(_mac) _mac[0], _mac[1], _mac[2], \
215 _mac[3], _mac[4], _mac[5]
216 #define MAC_SCAN_ARG(_mac) &_mac[0], &_mac[1], &_mac[2], \
217 &_mac[3], &_mac[4], &_mac[5]
void configure_path(void)
const char * sanitize_control_message(const char *str, struct gc_arena *gc)
struct buffer prepend_dir(const char *dir, const char *path, struct gc_arena *gc)
Prepend a directory to a path.
char username[USER_PASS_LEN]
void set_auth_token_user(struct user_pass *tk, const char *username)
Sets the auth-token username by base64 decoding the passed username.
const char ** make_extended_arg_array(char **p, bool is_inline, struct gc_arena *gc)
void output_peer_info_env(struct env_set *es, const char *peer_info)
bool get_user_pass_cr(struct user_pass *up, const char *auth_file, const char *prefix, const unsigned int flags, const char *auth_challenge)
Retrieves the user credentials from various sources depending on the flags.
const char * hostname_randomize(const char *hostname, struct gc_arena *gc)
const char * challenge_text
static char * auth_challenge
const char ** make_arg_array(const char *first, const char *parms, struct gc_arena *gc)
void purge_user_pass(struct user_pass *up, const bool force)
static bool get_user_pass(struct user_pass *up, const char *auth_file, const char *prefix, const unsigned int flags)
Retrieves the user credentials from various sources depending on the flags.
const char * challenge_text
Wrapper structure for dynamically allocated memory.
Garbage collection arena used to keep track of dynamically allocated memory.
const char * safe_print(const char *str, struct gc_arena *gc)
char password[USER_PASS_LEN]
bool validate_peer_info_line(char *line)
void set_std_files_to_null(bool stdin_only)
void set_auth_token(struct user_pass *tk, const char *token)
Sets the auth-token to token.