vlog: change log file owner when switching user
authorAndy Zhou <azhou@nicira.com>
Sat, 10 Oct 2015 02:07:40 +0000 (19:07 -0700)
committerAndy Zhou <azhou@nicira.com>
Thu, 12 Nov 2015 02:05:54 +0000 (18:05 -0800)
commit3de44dd188690763cfa8f08cf36c64ade0174501
tree3cb1216bc9d5a7fe802f30cf132f8efb57c13179
parent6069edb0ea9c861d32016473a86d330f5ce60123
vlog: change log file owner when switching user

vlog log file can be created when parsing --log-file option, before
switching user, in case the --user option is also specified. While this
does not directly cause errors for the running daemons, it can
leave the log files on the disk as created under the "root" user.
This patch fix the log file ownership to the user specified with --user.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
include/openvswitch/vlog.h
lib/daemon-unix.c
lib/vlog.c