From: <ro...@us...> - 2003-11-17 15:19:27
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/getgroups In directory sc8-pr-cvs1:/tmp/cvs-serv26705 Modified Files: getgroups03.c Log Message: Susanne Wintenberger fixed Manoj's change to the test, so I was able to re-add the correct code. Index: getgroups03.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/getgroups/getgroups03.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- getgroups03.c 12 Nov 2003 15:22:21 -0000 1.9 +++ getgroups03.c 17 Nov 2003 15:18:46 -0000 1.10 @@ -176,6 +176,16 @@ * from /etc/group file */ ngroups=readgroups(groups); + + /* Setgroups is called by the login(1) process + * if the testcase is executed via an ssh session this + * testcase will fail. So execute setgroups() before executing + * getgroups() + */ + if (setgroups(ngroups, groups) == -1) { + tst_resm (TFAIL, "failed to setup testcase"); + cleanup(); + } } /* End setup() */ |