[CRIU] [PATCH 4/4] log: chown log to current criu user
Ruslan Kuprieiev
kupruser at gmail.com
Thu Jan 29 12:59:30 PST 2015
User is already able to see it in stdout, so there is no
reason why we should protect it.
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
log.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/log.c b/log.c
index 0a5eb58..a9f1757 100644
--- a/log.c
+++ b/log.c
@@ -86,6 +86,11 @@ int log_init(const char *output)
pr_perror("Can't create log file %s", output);
return -1;
}
+
+ if (cr_fchown(new_logfd)) {
+ pr_perror("Can't chown log file %s", output);
+ return -1;
+ }
} else {
new_logfd = dup(DEFAULT_LOGFD);
if (new_logfd < 0) {
--
2.1.0
More information about the CRIU
mailing list