str_append(str, "\tsession=");
str_append_tabescaped(str, state->session_id);
}
+ if (state->session_created != 0) {
+ str_printfa(str, "\tsession_created=%s",
+ dec2str(state->session_created));
+ }
if (state->tag != NULL)
str_printfa(str, "\ttag=%s", client->state.tag);
if (state->local_ip.family != 0)
/* optional: */
const char *session_id, *userdb_fields, *stats;
struct ip_addr local_ip, remote_ip;
+ time_t session_created;
uid_t uid;
gid_t gid;
state_r->idle_cmd = TRUE;
} else if (strcmp(key, "session") == 0) {
state_r->session_id = value;
+ } else if (strcmp(key, "session_created") == 0) {
+ if (str_to_time(value, &state_r->session_created) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid session_created value: %s", value);
+ return -1;
+ }
} else if (strcmp(key, "userdb_fields") == 0) {
state_r->userdb_fields = value;
} else if (strcmp(key, "notify_fd") == 0) {
str_append(cmd, "\tsession=");
str_append_tabescaped(cmd, client->session_id);
}
+ if (client->user->session_create_time != 0) {
+ str_printfa(cmd, "\tsession_created=%s",
+ dec2str(client->user->session_create_time));
+ }
if (client->user->local_ip != NULL)
str_printfa(cmd, "\tlip=%s", net_ip2addr(client->user->local_ip));
if (client->user->remote_ip != NULL)
}
} else if (strcmp(key, "session") == 0) {
input_r->session_id = value;
+ } else if (strcmp(key, "session_created") == 0) {
+ if (str_to_time(value, &input_r->session_create_time) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid session_created value: %s", value);
+ return -1;
+ }
} else if (strcmp(key, "userdb_fields") == 0) {
input_r->userdb_fields =
t_strsplit_tabescaped(value);