nsjail: save console just before we're prepared to run commands
This commit is contained in:
parent
2470635c7c
commit
0b8e927aed
@ -183,8 +183,6 @@ void nsjailSetTC(int fd, std::unique_ptr<struct termios>& trm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
std::unique_ptr<struct termios> trm = nsjailGetTC(STDIN_FILENO);
|
|
||||||
|
|
||||||
std::unique_ptr<nsjconf_t> nsjconf = cmdline::parseArgs(argc, argv);
|
std::unique_ptr<nsjconf_t> nsjconf = cmdline::parseArgs(argc, argv);
|
||||||
if (!nsjconf) {
|
if (!nsjconf) {
|
||||||
LOG_F("Couldn't parse cmdline options");
|
LOG_F("Couldn't parse cmdline options");
|
||||||
@ -206,6 +204,8 @@ int main(int argc, char* argv[]) {
|
|||||||
LOG_F("Couldn't prepare sandboxing policy");
|
LOG_F("Couldn't prepare sandboxing policy");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<struct termios> trm = nsjailGetTC(STDIN_FILENO);
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (nsjconf->mode == MODE_LISTEN_TCP) {
|
if (nsjconf->mode == MODE_LISTEN_TCP) {
|
||||||
nsjailListenMode(nsjconf.get());
|
nsjailListenMode(nsjconf.get());
|
||||||
|
Loading…
Reference in New Issue
Block a user