-Ikafel/include
CXXFLAGS += $(COMMON_FLAGS) $(shell pkg-config --cflags protobuf) \
- -std=c++14 -fno-exceptions -Wno-unused -Wno-unused-parameter
+ -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter
LDFLAGS += -pie -Wl,-z,noexecstack -lpthread $(shell pkg-config --libs protobuf)
BIN = nsjail
}
std::unique_ptr<nsjconf_t> parseArgs(int argc, char* argv[]) {
- std::unique_ptr<nsjconf_t> nsjconf = std::make_unique<nsjconf_t>();
+ std::unique_ptr<nsjconf_t> nsjconf;
+ nsjconf.reset(new nsjconf_t);
nsjconf->use_execveat = false;
nsjconf->exec_fd = -1;
return false;
}
- struct ifreq ifr = {};
+ struct ifreq ifr;
+ memset(&ifr, '\0', sizeof(ifr));
snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", ifacename);
if (ioctl(sock, SIOCGIFFLAGS, &ifr) == -1) {
}
static bool netConfigureVs(nsjconf_t* nsjconf) {
- struct ifreq ifr = {};
+ struct ifreq ifr;
+ memset(&ifr, '\0', sizeof(ifr));
snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", IFACE_NAME);
struct in_addr addr;
return true;
}
- struct rtentry rt = {};
+ struct rtentry rt;
+ memset(&rt, '\0', sizeof(rt));
struct sockaddr_in* sdest = (struct sockaddr_in*)(&rt.rt_dst);
struct sockaddr_in* smask = (struct sockaddr_in*)(&rt.rt_genmask);