Allow to set oidentd path
This commit is contained in:
parent
e8b5d02f13
commit
5db61f3982
3
TODO
3
TODO
@ -1,6 +1,3 @@
|
||||
<jj> faudrait ptet pouvoir specifier directement le oidentd_path
|
||||
|
||||
|
||||
- Allow to dump a config file, so that when the config is dynamically
|
||||
changed, we can find it back after bip restart.
|
||||
|
||||
|
@ -140,6 +140,10 @@ delay = reconn_timer * number of attempts
|
||||
Defines the file where BIP's pid will be stored. BIP checks if this file exists
|
||||
and if the pid is still alive upon startup. If true, BIP refuses to start.
|
||||
|
||||
.TP
|
||||
\fBoidentd_file\fP (default: \fB<bipdir>/.oidentd.conf\fP)
|
||||
oidentd configuration file (if oidentd enabled).
|
||||
|
||||
.TP
|
||||
\fBport\fP (default: \fB7778\fP)
|
||||
The port on which BIP should listen for clients.
|
||||
|
@ -29,6 +29,9 @@ client_side_ssl = false;
|
||||
# Define where the pidfile should be stored. Defaults to <bipdir>/bip.pid
|
||||
#pid_file="/var/run/bip/bip.pid";
|
||||
|
||||
# Defaults to <bipdir>/.oidentd.conf
|
||||
#oidentd_file="";
|
||||
|
||||
# Uncomment this line to disable logging and backlogging.
|
||||
#log = false
|
||||
|
||||
|
@ -55,7 +55,7 @@ syn region bipMain start=/\%^/ end=/\%$/
|
||||
syn keyword bipKeyword contained nextgroup=bipBoolV client_side_ssl
|
||||
\ log log_system
|
||||
syn keyword bipKeyword contained nextgroup=bipStringV log_root
|
||||
\ log_format pid_file client_side_ssl_pem client_side_ciphers
|
||||
\ log_format oidentd_file pid_file client_side_ssl_pem client_side_ciphers
|
||||
\ ssl_default_ciphers
|
||||
syn keyword bipKeyword contained nextgroup=bipNumericV port log_level
|
||||
\ log_sync_interval
|
||||
|
23
src/bip.c
23
src/bip.c
@ -1031,6 +1031,17 @@ int fireup(bip_t *bip, FILE *conf)
|
||||
case LEX_PID_FILE:
|
||||
MOVE_STRING(conf_pid_file, t->pdata);
|
||||
break;
|
||||
|
||||
#ifdef HAVE_OIDENTD
|
||||
case LEX_OIDENTD_FILE:
|
||||
MOVE_STRING(bip->oidentdpath, t->pdata);
|
||||
break;
|
||||
#else
|
||||
case LEX_OIDENTD_FILE:
|
||||
mylog(LOG_WARN, "Found oidentd option whereas bip is "
|
||||
"not built with oidentd support.");
|
||||
break;
|
||||
#endif
|
||||
case LEX_ALWAYS_BACKLOG:
|
||||
hds.always_backlog = t->ndata;
|
||||
break;
|
||||
@ -1254,11 +1265,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifdef HAVE_OIDENTD
|
||||
bip.oidentdpath = bip_malloc(strlen(conf_biphome) + 1 +
|
||||
strlen(OIDENTD_FILENAME) + 1);
|
||||
strcpy(bip.oidentdpath, conf_biphome);
|
||||
strcat(bip.oidentdpath, "/");
|
||||
strcat(bip.oidentdpath, OIDENTD_FILENAME);
|
||||
if (!bip.oidentdpath) {
|
||||
bip.oidentdpath = bip_malloc(strlen(conf_biphome) + 1 +
|
||||
strlen(OIDENTD_FILENAME) + 1);
|
||||
strcpy(bip.oidentdpath, conf_biphome);
|
||||
strcat(bip.oidentdpath, "/");
|
||||
strcat(bip.oidentdpath, OIDENTD_FILENAME);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!confpath) {
|
||||
|
@ -68,7 +68,7 @@ struct tuple *tuple_l_new(int type, void *p)
|
||||
|
||||
%}
|
||||
|
||||
%token LEX_IP LEX_EQ LEX_PORT LEX_CSS LEX_SEMICOLON LEX_CONNECTION LEX_NETWORK LEX_LBRA LEX_RBRA LEX_USER LEX_NAME LEX_NICK LEX_SERVER LEX_PASSWORD LEX_SRCIP LEX_HOST LEX_VHOST LEX_SOURCE_PORT LEX_NONE LEX_COMMENT LEX_BUNCH LEX_REALNAME LEX_SSL LEX_SSL_CHECK_MODE LEX_SSL_CHECK_STORE LEX_SSL_CLIENT_CERTFILE LEX_CIPHERS LEX_CSS_CIPHERS LEX_DEFAULT_CIPHERS LEX_CHANNEL LEX_KEY LEX_LOG_ROOT LEX_LOG_FORMAT LEX_LOG_LEVEL LEX_BACKLOG_LINES LEX_BACKLOG_NO_TIMESTAMP LEX_BACKLOG LEX_LOG LEX_LOG_SYSTEM LEX_LOG_SYNC_INTERVAL LEX_FOLLOW_NICK LEX_ON_CONNECT_SEND LEX_AWAY_NICK LEX_PID_FILE LEX_IGN_FIRST_NICK LEX_ALWAYS_BACKLOG LEX_BLRESET_ON_TALK LEX_BLRESET_CONNECTION LEX_DEFAULT_USER LEX_DEFAULT_NICK LEX_DEFAULT_REALNAME LEX_NO_CLIENT_AWAY_MSG LEX_BL_MSG_ONLY LEX_ADMIN LEX_BIP_USE_NOTICE LEX_CSS_PEM LEX_AUTOJOIN_ON_KICK LEX_IGNORE_CAPAB LEX_RECONN_TIMER
|
||||
%token LEX_IP LEX_EQ LEX_PORT LEX_CSS LEX_SEMICOLON LEX_CONNECTION LEX_NETWORK LEX_LBRA LEX_RBRA LEX_USER LEX_NAME LEX_NICK LEX_SERVER LEX_PASSWORD LEX_SRCIP LEX_HOST LEX_VHOST LEX_SOURCE_PORT LEX_NONE LEX_COMMENT LEX_BUNCH LEX_REALNAME LEX_SSL LEX_SSL_CHECK_MODE LEX_SSL_CHECK_STORE LEX_SSL_CLIENT_CERTFILE LEX_CIPHERS LEX_CSS_CIPHERS LEX_DEFAULT_CIPHERS LEX_CHANNEL LEX_KEY LEX_LOG_ROOT LEX_LOG_FORMAT LEX_LOG_LEVEL LEX_BACKLOG_LINES LEX_BACKLOG_NO_TIMESTAMP LEX_BACKLOG LEX_LOG LEX_LOG_SYSTEM LEX_LOG_SYNC_INTERVAL LEX_FOLLOW_NICK LEX_ON_CONNECT_SEND LEX_AWAY_NICK LEX_PID_FILE LEX_OIDENTD_FILE LEX_IGN_FIRST_NICK LEX_ALWAYS_BACKLOG LEX_BLRESET_ON_TALK LEX_BLRESET_CONNECTION LEX_DEFAULT_USER LEX_DEFAULT_NICK LEX_DEFAULT_REALNAME LEX_NO_CLIENT_AWAY_MSG LEX_BL_MSG_ONLY LEX_ADMIN LEX_BIP_USE_NOTICE LEX_CSS_PEM LEX_AUTOJOIN_ON_KICK LEX_IGNORE_CAPAB LEX_RECONN_TIMER
|
||||
|
||||
%union {
|
||||
int number;
|
||||
@ -106,6 +106,7 @@ command:
|
||||
| LEX_LOG_SYNC_INTERVAL LEX_EQ LEX_INT { $$ = tuple_i_new(
|
||||
LEX_LOG_SYNC_INTERVAL, $3); }
|
||||
| LEX_PID_FILE LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_PID_FILE, $3); }
|
||||
| LEX_OIDENTD_FILE LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_OIDENTD_FILE, $3); }
|
||||
/* deprecated */
|
||||
| LEX_BACKLOG_LINES LEX_EQ LEX_INT {
|
||||
$$ = tuple_i_new(LEX_BACKLOG_LINES, $3);
|
||||
|
@ -108,6 +108,7 @@ list_t *parse_conf(FILE *file, int *err)
|
||||
"on_connect_send" { return LEX_ON_CONNECT_SEND; }
|
||||
"no_client_away_msg" { return LEX_NO_CLIENT_AWAY_MSG; }
|
||||
"pid_file" { return LEX_PID_FILE; }
|
||||
"oidentd_file" { return LEX_OIDENTD_FILE; }
|
||||
"bip_use_notice" { return LEX_BIP_USE_NOTICE; }
|
||||
"client_side_ssl_pem" { return LEX_CSS_PEM; }
|
||||
"client_side_ciphers" { return LEX_CSS_CIPHERS; }
|
||||
|
Loading…
Reference in New Issue
Block a user