Re: BSD vs SYSV: setgroups()

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dom Mitchell
日付:  
To: Philip Hazel
CC: exim-users
題目: Re: BSD vs SYSV: setgroups()
Philip Hazel wrote:
> If people could try this out as root on various other OS, I'd be
> grateful. Please post the results to save too many people doing it.


Here we go: (oh, the marvels of cut'n'paste coding :-)

# uname -a
FreeBSD stress.noc.demon.net 2.2.1-RELEASE FreeBSD 2.2.1-RELEASE #0: Wed Apr 2 14:14:39 GMT 1997 hdm@???:/usr/src/sys/compile/STRESS i386
# cc -o q q.c
# ./q
count = 8
0 0 2 3 4 5 20 31
setgroups(0,NULL) failed: Invalid argument
setgroups(1,grouplist) succeeded
count = 1
0
gid = 8
count = 1
8
# id
uid=0(root) gid=0(wheel) groups=0(wheel), 2(kmem), 3(sys), 4(tty),
5(operator), 20(staff), 31(guest)
#

-Dom