[prev in list] [next in list] [prev in thread] [next in thread]
List: ltp-cvs
Subject: [Ltp-cvs] ltp/testcases/kernel/mem/hugetlb/hugeshmat hugeshmat02.c,1.2,1.3
From: Robert Williamson <robbiew () users ! sourceforge ! net>
Date: 2004-04-28 15:51:58
Message-ID: E1BIrLr-0002zC-7L () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/ltp/ltp/testcases/kernel/mem/hugetlb/hugeshmat
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11409
Modified Files:
hugeshmat02.c
Log Message:
Needed to remove non-root restriction, b/c large pages must be allocated
by root user.
Index: hugeshmat02.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** hugeshmat02.c 15 Apr 2004 20:23:39 -0000 1.2
--- hugeshmat02.c 28 Apr 2004 15:51:56 -0000 1.3
***************
*** 48,52 ****
*
* RESTRICTIONS
! * Must be ran as non-root
*/
--- 48,52 ----
*
* RESTRICTIONS
! * Must be ran as root
*/
***************
*** 55,59 ****
char *TCID = "hugeshmat02";
! int TST_TOTAL = 3;
extern int Tst_count;
char nobody_uid[] = "nobody";
--- 55,59 ----
char *TCID = "hugeshmat02";
! int TST_TOTAL = 2;
extern int Tst_count;
char nobody_uid[] = "nobody";
***************
*** 87,92 ****
{&shm_id_2, (void *)NADDR, EINVAL},
- /* EACCES - the shared memory resource has no read/write permission */
- {&shm_id_3, 0, EACCES}
};
--- 87,90 ----
***************
*** 152,167 ****
setup(void)
{
- /* Switch to nobody user for correct error code collection */
- if (geteuid() != 0) {
- tst_brkm(TBROK, tst_exit, "Test must be run as root");
- }
- ltpuser = getpwnam(nobody_uid);
- if (setuid(ltpuser->pw_uid) == -1) {
- tst_resm(TINFO, "setuid failed to "
- "to set the effective uid to %d",
- ltpuser->pw_uid);
- perror("setuid");
- }
-
/* capture signals */
--- 150,153 ----
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Ltp-cvs mailing list
Ltp-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic