Merge pull request #2570 from brauner/2018-08-23/fix_privileged_logging

execute: pass /proc/self/fd/<nr>
This commit is contained in:
Wolfgang Bumiller 2018-08-23 17:58:43 +02:00 committed by GitHub
commit 40a6212ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ static int execute_start(struct lxc_handler *handler, void* data)
goto out2; goto out2;
} }
ret = snprintf(logfile, sizeof(logfile), "/proc/1/fd/%d", logfd); ret = snprintf(logfile, sizeof(logfile), "/proc/self/fd/%d", logfd);
if (ret < 0 || (size_t)ret >= sizeof(logfile)) if (ret < 0 || (size_t)ret >= sizeof(logfile))
goto out3; goto out3;