Re: useradd with empty -k doesn't chown/chmod new home directory

2013-09-10 Thread Craig R. Skinner
ping On 2013-09-05 Thu 14:48 PM |, Todd C. Miller wrote: I changed my mind and decided it is better to just move the chown and chmod out of copydotfiles() and add an explicit check for skeldir set to the empty string. Much as I would like to prettify the user.c code it is a losing battle so

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-09-07 Thread Craig R. Skinner
Solved? On 2013-09-05 Thu 14:48 PM |, Todd C. Miller wrote: I changed my mind and decided it is better to just move the chown and chmod out of copydotfiles() and add an explicit check for skeldir set to the empty string. Much as I would like to prettify the user.c code it is a losing battle

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-09-05 Thread Craig R. Skinner
On 2013-08-31 Sat 11:18 AM |, Kenneth R Westerback wrote: This makes sense to me. ok krw@ Ken ping? -- Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-09-05 Thread Todd C. Miller
I changed my mind and decided it is better to just move the chown and chmod out of copydotfiles() and add an explicit check for skeldir set to the empty string. Much as I would like to prettify the user.c code it is a losing battle so here is a minimal diff. - todd Index: usr.sbin/user/user.c

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-09-05 Thread Alexander Hall
Todd C. Miller todd.mil...@courtesan.com wrote: I changed my mind and decided it is better to just move the chown and chmod out of copydotfiles() and add an explicit check for skeldir set to the empty string. Much as I would like to prettify the user.c code it is a losing battle so here is a

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-09-02 Thread Craig R. Skinner
On 2013-08-31 Sat 11:45 AM |, patrick keshishian wrote: On Sat, Aug 31, 2013 at 06:23:25AM -0600, Todd C. Miller wrote: Assuming we want to make this a non-fatal error the following should do. You meant non-existent skel dir, not empty. Unless you meant empty argument for -k option, i.e.,

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-08-31 Thread Todd C. Miller
Assuming we want to make this a non-fatal error the following should do. - todd Index: usr.sbin/user/user.c === RCS file: /home/cvs/openbsd/src/usr.sbin/user/user.c,v retrieving revision 1.95 diff -u -r1.95 user.c ---

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-08-31 Thread Kenneth R Westerback
On Sat, Aug 31, 2013 at 06:23:25AM -0600, Todd C. Miller wrote: Assuming we want to make this a non-fatal error the following should do. - todd Index: usr.sbin/user/user.c === RCS file:

Re: useradd with empty -k doesn't chown/chmod new home directory

2013-08-31 Thread patrick keshishian
On Sat, Aug 31, 2013 at 06:23:25AM -0600, Todd C. Miller wrote: Assuming we want to make this a non-fatal error the following should do. You meant non-existent skel dir, not empty. Unless you meant empty argument for -k option, i.e., -k , but is there a good use-case for that? Also, I recall