summaryrefslogtreecommitdiff
path: root/sysdep/unix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r--sysdep/unix/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index d6176841..9219da9b 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -170,7 +170,10 @@ cf_open(char *filename)
int ret;
if (*filename != '/') {
- snprintf(full_name, sizeof(full_name), "%s/%s", dirname(config_name), filename);
+ char dir[BIRD_FNAME_MAX];
+ strncpy(dir, config_name, sizeof(dir));
+ dir[sizeof(dir)-1] = 0;
+ snprintf(full_name, sizeof(full_name), "%s/%s", dirname(dir), filename);
full_name[sizeof(full_name)-1] = 0;
cur = full_name;
}
@@ -188,7 +191,7 @@ sysdep_preconfig(struct config *c)
init_list(&c->logfiles);
#ifdef PATH_IPROUTE_DIR
- // read_iproute_table(PATH_IPROUTE_DIR "/rt_protos", "ipp_", 256);
+ read_iproute_table(PATH_IPROUTE_DIR "/rt_protos", "ipp_", 256);
read_iproute_table(PATH_IPROUTE_DIR "/rt_realms", "ipr_", 256);
read_iproute_table(PATH_IPROUTE_DIR "/rt_scopes", "ips_", 256);
read_iproute_table(PATH_IPROUTE_DIR "/rt_tables", "ipt_", 256);
@@ -643,6 +646,7 @@ main(int argc, char **argv)
io_init();
rt_init();
if_init();
+ roa_init();
uid_t use_uid = get_uid(use_user);
gid_t use_gid = get_gid(use_group);