mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 21:07:43 +00:00
log: chown log to current criu user
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@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
e2c3ad3791
commit
bb0a6f0cb6
5
log.c
5
log.c
@ -86,6 +86,11 @@ int log_init(const char *output)
|
|||||||
pr_perror("Can't create log file %s", output);
|
pr_perror("Can't create log file %s", output);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cr_fchown(new_logfd)) {
|
||||||
|
pr_perror("Can't chown log file %s", output);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
new_logfd = dup(DEFAULT_LOGFD);
|
new_logfd = dup(DEFAULT_LOGFD);
|
||||||
if (new_logfd < 0) {
|
if (new_logfd < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user