Hi, all,
I found that I could add the same user into same group for many times, like:
root@PeterDev2:/usr/src/lib# pw user mod -n peter1 -G petergroup1
root@PeterDev2:/usr/src/lib# pw group show petergroup1
petergroup1:*:1001:peter1
root@PeterDev2:/usr/src/lib# pw user mod -n peter1 -G petergroup1
root@PeterDev2:/usr/src/lib# pw group show petergroup1
petergroup1:*:1001:peter1,peter1
This is strange. I had a look at the source code at
/usr/src/lib/libutil/gr_util.c and found that there is no check on whether
the group already has the specific user when doing gr_add().
Further, I checked the commit log of BSD head on SVN, it seems that there
was the check:
https://svnweb.freebsd.org/base?view=revision&revision=244736
But it is removed in another refactoring:
https://svnweb.freebsd.org/base?view=revision&revision=247919
So... Is it a bug?
Peter
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"