Merge branch 'master' of ssh://github.com/google/nsjail

This commit is contained in:
Robert Swiecki 2018-11-24 17:22:13 +01:00
commit 2bee68f9df
2 changed files with 2 additions and 3 deletions

View File

@ -383,8 +383,7 @@ static bool initParent(nsjconf_t* nsjconf, pid_t pid, int pipefd) {
LOG_E("Couldn't initialize user namespace for pid %d", pid);
return false;
}
if (util::writeToFd(pipefd, &kSubprocDoneChar, sizeof(kSubprocDoneChar)) !=
sizeof(kSubprocDoneChar)) {
if (!util::writeToFd(pipefd, &kSubprocDoneChar, sizeof(kSubprocDoneChar))) {
LOG_E("Couldn't signal the new process via a socketpair");
return false;
}

View File

@ -75,7 +75,7 @@ ssize_t readFromFile(const char* fname, void* buf, size_t len) {
return ret;
}
ssize_t writeToFd(int fd, const void* buf, size_t len) {
bool writeToFd(int fd, const void* buf, size_t len) {
const uint8_t* charbuf = (const uint8_t*)buf;
size_t writtenSz = 0;