[prev in list] [next in list] [prev in thread] [next in thread]
List: ltp-list
Subject: [LTP] [patch 2/2] fix setgroups02 by calling setgroups()/getgroups
From: Daniel Gollub <dgollub () suse ! de>
Date: 2008-10-20 11:34:42
Message-ID: 20081020114144.930760645 () marvin ! suse ! de
[Download RAW message or body]
setgroups02(_16) is working with an uninitialized list, expect the first GID
field. setgroups() and getgroups() additionally get called with the full length
of the uninitialized list. The uninitialized values cause setgroups02_16 to
fail:
===
setgroups02_16 1 BROK : gid returned from getgroups is too large for testing setgroups32
===
Since the uninitialized values could be greater then 0xffff.
Signed-off-by: Daniel Gollub <dgollub@suse.de>
---
Index: ltp-full-20081017/testcases/kernel/syscalls/setgroups/setgroups02.c
===================================================================
--- ltp-full-20081017.orig/testcases/kernel/syscalls/setgroups/setgroups02.c
+++ ltp-full-20081017/testcases/kernel/syscalls/setgroups/setgroups02.c
@@ -91,7 +91,7 @@ main(int ac, char **av)
{
int lc,i; /* loop counters */
char *msg; /* message returned from parse_opts */
- int gidsetsize = NGROUPS; /* total groups */
+ int gidsetsize = 1; /* only one GID, the GID of TESTUSER */
int PASS_FLAG = 0; /* used for checking group array */
/* Parse standard options given to run the test. */
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic