- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
--- coreutils-5.92/m4/jm-macros.m4.getgrouplist 2005-09-25 06:57:46.000000000 +0100
|
|
|
|
+++ coreutils-5.92/m4/jm-macros.m4 2005-10-25 14:28:45.000000000 +0100
|
|
|
|
@@ -105,6 +105,7 @@
|
|
|
|
fchmod \
|
|
|
|
fchown \
|
2004-10-05 15:45:31 +00:00
|
|
|
ftruncate \
|
|
|
|
+ getgrouplist \
|
|
|
|
hasmntopt \
|
|
|
|
isascii \
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
iswspace \
|
|
|
|
--- coreutils-5.92/lib/getugroups.c.getgrouplist 2005-09-22 07:47:18.000000000 +0100
|
|
|
|
+++ coreutils-5.92/lib/getugroups.c 2005-10-25 14:28:02.000000000 +0100
|
|
|
|
@@ -23,6 +23,9 @@
|
2004-10-05 15:45:31 +00:00
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+/* We do not need this code if getgrouplist(3) is available. */
|
|
|
|
+#ifndef HAVE_GETGROUPLIST
|
|
|
|
+
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <stdio.h> /* grp.h on alpha OSF1 V2.0 uses "FILE *". */
|
|
|
|
#include <grp.h>
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
@@ -105,3 +108,4 @@
|
2004-10-05 15:45:31 +00:00
|
|
|
|
|
|
|
return count;
|
|
|
|
}
|
|
|
|
+#endif /* have getgrouplist */
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
--- coreutils-5.92/src/id.c.getgrouplist 2005-08-11 22:02:57.000000000 +0100
|
|
|
|
+++ coreutils-5.92/src/id.c 2005-10-25 14:30:41.000000000 +0100
|
|
|
|
@@ -253,7 +253,14 @@
|
|
|
|
if (!username)
|
2004-10-05 15:45:31 +00:00
|
|
|
max_n_groups = getgroups (0, NULL);
|
|
|
|
else
|
|
|
|
- max_n_groups = getugroups (0, NULL, username, gid);
|
|
|
|
+ {
|
|
|
|
+#ifdef HAVE_GETGROUPLIST
|
|
|
|
+ max_n_groups = 0;
|
|
|
|
+ getgrouplist (username, gid, NULL, &max_n_groups);
|
|
|
|
+#else
|
|
|
|
+ max_n_groups = getugroups (0, NULL, username, gid);
|
|
|
|
+#endif
|
|
|
|
+ }
|
|
|
|
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
if (max_n_groups < 0)
|
|
|
|
ng = -1;
|
|
|
|
@@ -263,7 +270,22 @@
|
|
|
|
if (!username)
|
|
|
|
ng = getgroups (max_n_groups, g);
|
|
|
|
else
|
|
|
|
- ng = getugroups (max_n_groups, g, username, gid);
|
2004-10-05 15:45:31 +00:00
|
|
|
+ {
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
+#ifdef HAVE_GETGROUPLIST
|
|
|
|
+ int e;
|
|
|
|
+ ng = max_n_groups;
|
|
|
|
+ while ((e = getgrouplist (username, gid, g, &ng)) == -1
|
|
|
|
+ && ng > max_n_groups)
|
|
|
|
+ {
|
|
|
|
+ max_n_groups = ng;
|
|
|
|
+ g = xrealloc (g, max_n_groups * sizeof (GETGROUPS_T));
|
|
|
|
+ }
|
|
|
|
+ if (e == -1)
|
|
|
|
+ ng = -1;
|
2004-10-05 15:45:31 +00:00
|
|
|
+#else
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
+ ng = getugroups (max_n_groups, g, username, gid);
|
2004-10-05 15:45:31 +00:00
|
|
|
+#endif
|
- 5.92.
- No longer need afs, dircolors, utmp, gcc4, brokentest, dateseconds,
chown, rmaccess, copy, stale-utmp, no-sign-extend, fchown patches.
- Updated acl, dateman, pam, langinfo, i18n, getgrouplist, selinux patches.
- Dropped printf-ll, allow_old_options, jday, zh_CN patches.
- NOTE: i18n patch not ported for sort(1) yet.
2005-10-27 15:05:08 +00:00
|
|
|
+ }
|
|
|
|
}
|
2004-10-05 15:45:31 +00:00
|
|
|
|
|
|
|
if (ng < 0)
|