26 RCSID(
"$Id: c3215168ca67607be9913eb082d077197ff06402 $")
30 #include <freeradius-devel/ldap/base.h>
31 #include <freeradius-devel/util/debug.h>
46 int main(
int argc,
char **argv)
54 conf->proto = IPPROTO_UDP;
55 conf->dict_dir = DICTDIR;
56 conf->raddb_dir = RADDBDIR;
57 conf->secret = talloc_strdup(
conf,
"testing123");
68 talloc_set_log_stderr();
70 while ((c = getopt(argc, argv,
"46c:d:D:f:Fhi:l:n:p:qr:sS:t:vx")) != -1)
switch (c) {
74 fp = fopen(optarg,
"r");
79 if (fgets(filesecret,
sizeof(filesecret), fp) == NULL) {
86 p = filesecret + strlen(filesecret) - 1;
87 while ((p >= filesecret) &&
93 if (strlen(filesecret) < 2) {
94 ERROR(
"Secret in %s is too short", optarg);
98 conf->secret = talloc_strdup(
conf, filesecret);
104 PERROR(
"Failed parsing timeout value");
110 DEBUG(
"%s", sync_touch_version);
121 argc -= (optind - 1);
122 argv += (optind - 1);
124 if ((argc < 2) || ((
conf->secret == NULL) && (argc < 3))) {
125 ERROR(
"Insufficient arguments");
159 DEBUG(
"%s - Starting pass_persist read loop", sync_touch_version);
161 DEBUG(
"Read loop done");
#define USES_APPLE_DEPRECATED_API
int fr_fault_setup(TALLOC_CTX *ctx, char const *cmd, char const *program)
Registers signal handlers to execute panic_action on fatal signal.
#define fr_exit_now(_x)
Exit without calling atexit() handlers, producing a log message in debug builds.
static fr_dict_t const * dict_freeradius
static NEVER_RETURNS void usage(void)
int fr_dict_internal_afrom_file(fr_dict_t **out, char const *internal_name, char const *dependent)
(Re-)Initialize the special internal dictionary
int fr_dict_read(fr_dict_t *dict, char const *dict_dir, char const *filename)
Read supplementary attribute definitions into an existing dictionary.
fr_dict_gctx_t * fr_dict_global_ctx_init(TALLOC_CTX *ctx, bool free_at_exit, char const *dict_dir)
Initialise the global protocol hashes.
int fr_set_signal(int sig, sig_t func)
Sets a signal handler using sigaction if available, else signal.
static TALLOC_CTX * autofree
static void rs_signal_stop(UNUSED int sig)
int main(int argc, char **argv)
bool master
Server is a master.
bool start_tls
Whether we should use the StartTLS extension.
char const * fr_syserror(int num)
Guaranteed to be thread-safe version of strerror.
fr_slen_t fr_time_delta_from_str(fr_time_delta_t *out, char const *in, size_t inlen, fr_time_res_t hint)
Create fr_time_delta_t from a string.
static fr_time_delta_t fr_time_delta_from_sec(int64_t sec)
#define FR_DICTIONARY_FILE
void fr_perror(char const *fmt,...)
Print the current error to stderr with a prefix.
void fr_strerror_clear(void)
Clears all pending messages from the talloc pools.
int fr_check_lib_magic(uint64_t magic)
Check if the application linking to the library has the correct magic number.
#define RADIUSD_MAGIC_NUMBER