Re: allow usermod to remove user from secondary groups

2011-04-13 Thread Janne Johansson
2011/4/12 Frank Brodbeck > group. I am pretty unsure about my choice of F_SETSECGROUP, didn't knew > if I should choose 0x1200 or 0x1001 or even something completely > different. > +++ src/usr.sbin/user/user.c12 Apr 2011 17:36:01 - > @@ -101,7 +101,8 @@ >F_SHELL = 0x0200,

Re: allow usermod to remove user from secondary groups

2011-04-12 Thread Ingo Schwarze
Hi, Frank Brodbeck wrote on Tue, Apr 12, 2011 at 07:50:22PM +0200: > Here's a diff leaving -G alone and introducing -S I don't really see the point in adding functionality to adduser, useradd and friends. Both are low-quality, bloaty, mostly useless code in the first place. And each is a dupli

Re: allow usermod to remove user from secondary groups

2011-04-12 Thread Frank Brodbeck
Here's a diff leaving -G alone and introducing -S for setting a user's group. I am pretty unsure about my choice of F_SETSECGROUP, didn't knew if I should choose 0x1200 or 0x1001 or even something completely different. Index: src/usr.sbin/user/user.c ===

Re: allow usermod to remove user from secondary groups

2011-04-11 Thread Frank Brodbeck
On Sat, Apr 09, 2011 at 08:04:47PM +, Stuart Henderson wrote: > Considering the current behaviour of OpenBSD's usermod(8) I agree > it's dangerous to change this now. But it's certainly something > people need to do on occasion (for example some of Samba's features > need this), and usermod(8)

Re: allow usermod to remove user from secondary groups

2011-04-09 Thread Stuart Henderson
On 2011-04-08, Landry Breuil wrote: > On Fri, Apr 08, 2011 at 07:53:51PM +0200, Frank Brodbeck wrote: >> Hi, >> >> lately I was reading on misc@ [1] that there's no way to remove a user >> from secondary groups but by hand. I also searched for a PR but couldn't >> find one. The attached diff reme

Re: allow usermod to remove user from secondary groups

2011-04-08 Thread Frank Brodbeck
On Fri, Apr 08, 2011 at 09:54:37PM +0200, Landry Breuil wrote: > Hmm.. please no. Don't know if it's a bug or not, but i'm very used to > -G to _add_ groups to the existing group list for a user. If i > understand your diff correctly, one has to list all the groups it wants > the user to be in, whe

Re: allow usermod to remove user from secondary groups

2011-04-08 Thread Gilles Chehade
On Fri, Apr 08, 2011 at 09:54:37PM +0200, Landry Breuil wrote: > On Fri, Apr 08, 2011 at 07:53:51PM +0200, Frank Brodbeck wrote: > > Hi, > > > > lately I was reading on misc@ [1] that there's no way to remove a user > > from secondary groups but by hand. I also searched for a PR but couldn't > > f

Re: allow usermod to remove user from secondary groups

2011-04-08 Thread Ted Unangst
On Fri, Apr 8, 2011 at 1:53 PM, Frank Brodbeck wrote: > lately I was reading on misc@ [1] that there's no way to remove a user > from secondary groups but by hand. I also searched for a PR but couldn't > find one. The attached diff remedies the problem: > + while ((cp = strstr(cp, u

Re: allow usermod to remove user from secondary groups

2011-04-08 Thread Landry Breuil
On Fri, Apr 08, 2011 at 07:53:51PM +0200, Frank Brodbeck wrote: > Hi, > > lately I was reading on misc@ [1] that there's no way to remove a user > from secondary groups but by hand. I also searched for a PR but couldn't > find one. The attached diff remedies the problem: > > # id test > uid=1001(

allow usermod to remove user from secondary groups

2011-04-08 Thread Frank Brodbeck
Hi, lately I was reading on misc@ [1] that there's no way to remove a user from secondary groups but by hand. I also searched for a PR but couldn't find one. The attached diff remedies the problem: # id test uid=1001(test) gid=10(users) groups=10(users), 9(wsrc), 69(network), 117(dialer) # usermo