Added explicit logging to UTMP file.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-02-06 19:03:02 +01:00
parent 10d9b144be
commit e380053caa
11 changed files with 112 additions and 7 deletions

View File

@@ -69,6 +69,18 @@
else if (mand != 0) { \
fprintf(stderr, "Configuration option %s is mandatory.\n", name); \
}
#define READ_TF(name, s_name, mand, def) \
{ char* tmp_tf = NULL; \
READ_STRING(name, tmp_tf, mand); \
if (tmp_tf == NULL) s_name = def; \
else { \
if (strcasecmp(tmp_tf, "true") == 0 || strcasecmp(tmp_tf, "yes") == 0) \
s_name = 1; \
else \
s_name = 0; \
} \
}
#define READ_NUMERIC(name, s_name, mand) \
val = optionGetValue(pov, name); \
@@ -125,6 +137,8 @@ unsigned j;
READ_STRING("connect-script", config->connect_script, 0);
READ_STRING("disconnect-script", config->disconnect_script, 0);
READ_TF("use-utmp", config->use_utmp, 0, 1);
READ_STRING("tls-priorities", config->priorities, 0);
READ_STRING("chroot-dir", config->chroot_dir, 0);