Bugzilla – Attachment 732 Details for
Bug 938
"AllowGroups" option and secondary user's groups limit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test program for getgrouplist
grouptest.c (text/plain), 614 bytes, created by
Darren Tucker
on 2004-10-10 20:47:13 AEST
(
hide
)
Description:
test program for getgrouplist
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2004-10-10 20:47:13 AEST
Size:
614 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <limits.h> >#include <pwd.h> >#include <grp.h> >#include <sys/types.h> > >void >die(const char *msg) >{ > fprintf(stderr, "failed: %s\n", msg); > exit(1); >} > >int >main(int argc, char *argv[]) >{ > gid_t groups[NGROUPS_MAX]; > int i, ngroups = NGROUPS_MAX; > struct passwd *pw; > > if (argc != 2) > die("need user"); > > if ((pw = getpwnam(argv[1])) == NULL) > die("getpwent"); > > if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups) == -1) > die("getgrouplist"); > > printf("%s", pw->pw_name); > for (i = 0; i < ngroups; i++) > printf(" %d", groups[i]); > printf("\n"); > exit(0); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 938
:
727
|
728
|
729
|
730
|
731
| 732