On Mon, Sep 14, 2015 at 03:54:08PM -0700, Andy Zhou wrote:
> Common implementation for daemons to support the --user option which
> accepts "user:group" string as input. Performs sanity check on the
> input, and store the converted uid and gid.
> 
> daemon_become_new_user() needs to be called to make the actual user
> switch.
> 
> Signed-off-by: Andy Zhou <az...@nicira.com>
> ---
> v2 : use sysconf() to get proper buffer size. not hard code it
> v3:  only check uid not gid for setuid() permission.
>      use xmemdup0() and xstrdup() instead of strncpy() and strdup()

"sparse" doesn't like the variable-length array in
daemon_set_new_user().  I'd use xmalloc() instead.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to