[Merge] lp:~xnox/upstart/user-log-dir into lp:upstart

James Hunt james.hunt at canonical.com
Tue Jan 22 10:28:51 UTC 2013


Review: Needs Fixing

Hi Dmitrijs,

Just a few comments:

* init/xdg.c:
  - get_home_subdir(): Return NULL immediately if nih_sprintf() fails.
  - get_user_log_dir(): Return NULL immediately if nih_sprintf() fails.
  - create_dir():
    - for consistency, this should probably call
      init/system.c:int system_mkdir(const char *path, mode_t mode) passing
      @dir and 0700.
    - should assert @dir: I don't understand why it currently handles
      a NULL directory explicitly?
    - @dir param should be const.
    - Remove comment: the directory permissions must be 0700 according
      to the spec, which is an absolute value. Since we already reset
      umask(), the code will work as expected.
    - This (and/or system_mkdir()) should be documented explicitly as
      only creating the "leaf" directory (ie no recursive creation).
-- 
https://code.launchpad.net/~xnox/upstart/user-log-dir/+merge/143091
Your team Upstart Reviewers is subscribed to branch lp:upstart.



More information about the upstart-devel mailing list