config: bind port to config
authorRobert Swiecki <robert@swiecki.net>
Mon, 19 Jun 2017 21:52:56 +0000 (23:52 +0200)
committerRobert Swiecki <robert@swiecki.net>
Mon, 19 Jun 2017 21:52:56 +0000 (23:52 +0200)
config.c
configs/bash-with-fake-geteuid.cfg

index 512d3621b6d37443b0d1177e8a3c33bc2f186520..69173c6085746229ab445c62d3784975077e475a 100644 (file)
--- a/config.c
+++ b/config.c
@@ -64,6 +64,7 @@ static bool configParseInternal(struct nsjconf_t *nsjconf, Nsjail__NsJailConfig
        nsjconf->chroot = utilStrDup(njc->chroot_dir);
        nsjconf->hostname = utilStrDup(njc->hostname);
        nsjconf->cwd = utilStrDup(njc->cwd);
+       nsjconf->port = njc->port;
        nsjconf->bindhost = utilStrDup(njc->bindhost);
        nsjconf->max_conns_per_ip = njc->max_conns_per_ip;
        nsjconf->tlimit = njc->time_limit;
index 5b71e495be3f341b5d107b6d5d70c7c759ad9938..33311745784a12932f06a48abd0d48fd1148c20d 100644 (file)
@@ -13,7 +13,7 @@ mode: ONCE
 hostname: "JAILED-BASH"
 cwd: "/tmp"
 
-bindhost: "::1"
+bindhost: "127.0.0.1"
 max_conns_per_ip: 10
 port: 31337