Go to the documentation of this file.
67 #define USER_PASS_LEN 4096
69 #define USER_PASS_LEN 128
76 #ifdef ENABLE_MANAGEMENT
81 #define CR_ECHO (1<<0)
82 #define CR_RESPONSE (1<<1)
94 #define SC_ECHO (1<<0)
95 #define SC_CONCAT (1<<1)
109 #define GET_USER_PASS_MANAGEMENT (1<<0)
111 #define GET_USER_PASS_PASSWORD_ONLY (1<<2)
112 #define GET_USER_PASS_NEED_OK (1<<3)
113 #define GET_USER_PASS_NOFATAL (1<<4)
114 #define GET_USER_PASS_NEED_STR (1<<5)
115 #define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6)
117 #define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7)
118 #define GET_USER_PASS_STATIC_CHALLENGE (1<<8)
119 #define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9)
121 #define GET_USER_PASS_INLINE_CREDS (1<<10)
122 #define GET_USER_PASS_STATIC_CHALLENGE_CONCAT (1<<11)
135 const char *auth_file,
137 const unsigned int flags,
151 const char *auth_file,
153 const unsigned int flags)
194 #ifdef ENABLE_IPROUTE
195 extern const char *iproute_path;
223 #define _STRINGIFY(S) #S
225 #define MAC_FMT _STRINGIFY(%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx)
227 #define MAC_PRINT_ARG(_mac) _mac[0], _mac[1], _mac[2], \
228 _mac[3], _mac[4], _mac[5]
229 #define MAC_SCAN_ARG(_mac) &_mac[0], &_mac[1], &_mac[2], \
230 &_mac[3], &_mac[4], &_mac[5]
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.
void unprotect_user_pass(struct user_pass *up)
Decrypt username and password buffers in user_pass.
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)
void protect_user_pass(struct user_pass *up)
Encrypt username and password buffers in user_pass.
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.