Displaying 4 results from an estimated 4 matches for "bash_group_member".
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Use test_access from NetBSD when faccessat is unavailable
...index d1458df3..b7188df7 100644
--- a/usr/dash/bltin/test.c
+++ b/usr/dash/bltin/test.c
@@ -151,8 +151,7 @@ static int equalf(const char *, const char *);
#ifdef HAVE_FACCESSAT
static int test_file_access(const char *, int);
#else
-static int test_st_mode(const struct stat64 *, int);
-static int bash_group_member(gid_t);
+static int test_access(const struct stat64 *, int);
#endif
#ifdef HAVE_FACCESSAT
@@ -397,11 +396,11 @@ filstat(char *nm, enum token mode)
switch (mode) {
#ifndef HAVE_FACCESSAT
case FILRD:
- return test_st_mode(&s, R_OK);
+ return test_access(&s, R_OK);
case FILWR:
-...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Fix "test -x" as root on FreeBSD 8
...est.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c
index 458e9f55..bab9a1f9 100644
--- a/usr/dash/bltin/test.c
+++ b/usr/dash/bltin/test.c
@@ -155,6 +155,14 @@ static int test_st_mode(const struct stat64 *, int);
static int bash_group_member(gid_t);
#endif
+#ifdef HAVE_FACCESSAT
+# ifdef HAVE_TRADITIONAL_FACCESSAT
+static inline int faccessat_confused_about_superuser(void) { return 1; }
+# else
+static inline int faccessat_confused_about_superuser(void) { return 0; }
+# endif
+#endif
+
static inline intmax_t getn(const char *s)
{...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Fix "test -x" as root on FreeBSD 8
...est.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c
index 458e9f55..bab9a1f9 100644
--- a/usr/dash/bltin/test.c
+++ b/usr/dash/bltin/test.c
@@ -155,6 +155,14 @@ static int test_st_mode(const struct stat64 *, int);
static int bash_group_member(gid_t);
#endif
+#ifdef HAVE_FACCESSAT
+# ifdef HAVE_TRADITIONAL_FACCESSAT
+static inline int faccessat_confused_about_superuser(void) { return 1; }
+# else
+static inline int faccessat_confused_about_superuser(void) { return 0; }
+# endif
+#endif
+
static inline intmax_t getn(const char *s)
{...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: maximilian attems <max at stro.at>
diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c
index 77949de..8f9e085 100644
--- a/usr/dash/bltin/test.c
+++ b/usr/dash/bltin/test.c
@@ -489,7 +489,8 @@ bash_group_member(gid_t gid)
ngroups = getgroups(0, NULL);
group_array = stalloc(ngroups * sizeof(gid_t));
- getgroups(ngroups, group_array);
+ if ((getgroups(ngroups, group_array)) != ngroups)
+ return (0);
/* Search through the list looking for GID. */
for (i = 0; i < ngroups; i++)
diff --git a/usr...