67#define USER_PASS_LEN 4096
69#define USER_PASS_LEN 128
76#ifdef ENABLE_MANAGEMENT
82#define CR_RESPONSE (1<<1)
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)
195extern 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]
void unprotect_user_pass(struct user_pass *up)
Decrypt 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 ** make_arg_array(const char *first, const char *parms, struct gc_arena *gc)
void purge_user_pass(struct user_pass *up, const bool force)
bool validate_peer_info_line(char *line)
void set_auth_token_user(struct user_pass *tk, const char *username)
Sets the auth-token username by base64 decoding the passed username.
void set_std_files_to_null(bool stdin_only)
void output_peer_info_env(struct env_set *es, const char *peer_info)
struct buffer prepend_dir(const char *dir, const char *path, struct gc_arena *gc)
Prepend a directory to a path.
const char * sanitize_control_message(const char *str, struct gc_arena *gc)
void protect_user_pass(struct user_pass *up)
Encrypt username and password buffers in user_pass.
const char ** make_extended_arg_array(char **p, bool is_inline, struct gc_arena *gc)
const char * safe_print(const char *str, struct gc_arena *gc)
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 * hostname_randomize(const char *hostname, struct gc_arena *gc)
void set_auth_token(struct user_pass *tk, const char *token)
Sets the auth-token to token.
static char * auth_challenge
const char * challenge_text
Wrapper structure for dynamically allocated memory.
int len
Length in bytes of the actual content within the allocated memory.
Garbage collection arena used to keep track of dynamically allocated memory.
const char * challenge_text
char password[USER_PASS_LEN]
char username[USER_PASS_LEN]