X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/1286e7d30941e2f0215b0f82f1eb748b49872228..e2bae31171dc8902098c6e79b3f651d2fb4899ef:/package/busybox/patches/803-id_getgrouplist.patch diff --git a/package/busybox/patches/803-id_getgrouplist.patch b/package/busybox/patches/803-id_getgrouplist.patch index 48aa57c04..66c184959 100644 --- a/package/busybox/patches/803-id_getgrouplist.patch +++ b/package/busybox/patches/803-id_getgrouplist.patch @@ -5,9 +5,9 @@ Signed-off-by: Nicolas Thill --- a/coreutils/id.c +++ b/coreutils/id.c -@@ -17,10 +17,12 @@ +@@ -63,10 +63,12 @@ - #include "libbb.h" + /* This is a NOEXEC applet. Be very careful! */ +#define HAVE_GETGROUPLIST 1 + @@ -19,7 +19,7 @@ Signed-off-by: Nicolas Thill #endif #endif #endif -@@ -82,7 +84,11 @@ static int get_groups(const char *userna +@@ -128,7 +130,11 @@ static int get_groups(const char *userna /* If the user is a member of more than * *n groups, then -1 is returned. Otherwise >= 0. * (and no defined way of detecting errors?!) */ @@ -30,8 +30,8 @@ Signed-off-by: Nicolas Thill +#endif /* I guess *n < 0 might indicate error. Anyway, * malloc'ing -1 bytes won't be good, so: */ - //if (*n < 0) -@@ -154,6 +160,7 @@ int id_main(int argc UNUSED_PARAM, char + if (*n < 0) +@@ -210,6 +216,7 @@ int id_main(int argc UNUSED_PARAM, char if (egid != rgid) status |= print_group(egid, " "); } @@ -39,7 +39,7 @@ Signed-off-by: Nicolas Thill /* We are supplying largish buffer, trying * to not run get_groups() twice. That might be slow * ("user database in remote SQL server" case) */ -@@ -181,6 +188,7 @@ int id_main(int argc UNUSED_PARAM, char +@@ -236,6 +243,7 @@ int id_main(int argc UNUSED_PARAM, char } if (ENABLE_FEATURE_CLEAN_UP) free(groups);