----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52310/#review150737 -----------------------------------------------------------
src/slave/container_loggers/logrotate.cpp (line 38) <https://reviews.apache.org/r/52310/#comment218793> This header isn't necessary now that you're using `os::su(...)`. src/slave/container_loggers/logrotate.cpp (lines 46 - 49) <https://reviews.apache.org/r/52310/#comment218794> These aren't necessary now that you're using `os::su(...)`. src/slave/container_loggers/logrotate.cpp (lines 248 - 259) <https://reviews.apache.org/r/52310/#comment218796> We should switch users prior to `spawn(&process);` Otherwise, it is possible for the files to be created under the previous user (i.e. `root`). - Joseph Wu On Sept. 27, 2016, 12:59 p.m., Sivaram Kannan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52310/ > ----------------------------------------------------------- > > (Updated Sept. 27, 2016, 12:59 p.m.) > > > Review request for mesos and Joseph Wu. > > > Bugs: MESOS-5856 > https://issues.apache.org/jira/browse/MESOS-5856 > > > Repository: mesos > > > Description > ------- > > Switch the uid of the binary if a user is passed from the lib_logrotate. > > Note: Previuos rbr to this commit has been discarded. Refer: > https://reviews.apache.org/r/52097/ > > > Diffs > ----- > > src/slave/container_loggers/logrotate.cpp > 431bc3cbb54e94359078e4dae0b32ad301393640 > > Diff: https://reviews.apache.org/r/52310/diff/ > > > Testing > ------- > > 1. Run the mesos-logrotate-logger with un-priviledged user and verify whether > the logs are getting rotated. > 2. Run the mesos-logrotate-logger as root user and verify whether the logs > are getting rotated. > > > Thanks, > > Sivaram Kannan > >