39#include <systemd/sd-daemon.h>
46check_systemd_running(
void)
54 return (sd_booted() > 0)
55 && (stat(SYSTEMD_ASK_PASSWORD_PATH, &c) == 0);
60get_console_input_systemd(
const char *prompt,
const bool echo,
char *input,
const int capacity)
67#ifdef SYSTEMD_NEWER_THAN_216
101query_user_exec_systemd(
void)
107 if (!check_systemd_running())
void argv_free(struct argv *a)
Frees all memory allocations allocated by the struct argv related functions.
bool argv_printf(struct argv *argres, const char *format,...)
printf() variant which populates a struct argv.
bool argv_printf_cat(struct argv *argres, const char *format,...)
printf() inspired argv concatenation.
struct argv argv_new(void)
Allocates a new struct argv and ensures it is initialised.
struct _query_user query_user[QUERY_USER_NUMSLOTS]
Global variable, declared in console.c.
bool query_user_exec_builtin(void)
Loop through configured query_user slots, using the built-in method for querying the user.
#define QUERY_USER_NUMSLOTS
int openvpn_popen(const struct argv *a, const struct env_set *es)
char * response
The user's response.