Re: [ovs-dev] [v3 04/10] lib/damon: add --user option

2015-10-12 Thread ALeX Wang
Thx, all make sense, On 12 October 2015 at 11:25, Andy Zhou wrote: > On Sun, Oct 11, 2015 at 10:33 PM, ALeX Wang wrote: > > Hey Andy, > > > > Sorry for this late post, just very interested in the feature > > implemented in this series, one question below, > > > >> + > >> +user_spec += strsp

Re: [ovs-dev] [v3 04/10] lib/damon: add --user option

2015-10-12 Thread Andy Zhou
On Sun, Oct 11, 2015 at 10:33 PM, ALeX Wang wrote: > Hey Andy, > > Sorry for this late post, just very interested in the feature > implemented in this series, one question below, > >> + >> +user_spec += strspn(user_spec, " \t\r\n"); > > > > In which circumstance will the option value be prefix

Re: [ovs-dev] [v3 04/10] lib/damon: add --user option

2015-10-11 Thread ALeX Wang
Hey Andy, Sorry for this late post, just very interested in the feature implemented in this series, one question below, + > +user_spec += strspn(user_spec, " \t\r\n"); > In which circumstance will the option value be prefixed by "\t\r\n"? Is this some common parsing practice? Thanks, Alex

Re: [ovs-dev] [v3 04/10] lib/damon: add --user option

2015-09-19 Thread Ansis Atteka
On Mon, Sep 14, 2015 at 3:54 PM, 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 ac

Re: [ovs-dev] [v3 04/10] lib/damon: add --user option

2015-09-18 Thread Ben Pfaff
On Fri, Sep 18, 2015 at 12:44:40PM -0700, Ben Pfaff wrote: > 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

Re: [ovs-dev] [v3 04/10] lib/damon: add --user option

2015-09-18 Thread Ben Pfaff
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 ma

[ovs-dev] [v3 04/10] lib/damon: add --user option

2015-09-14 Thread Andy Zhou
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 --- v2 : use sy