public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] Add tst_require_root to acct01 testcase.
@ 2011-01-20 13:30 Cristian Greco
  2011-01-21  8:28 ` Garrett Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Cristian Greco @ 2011-01-20 13:30 UTC (permalink / raw)
  To: ltp-list; +Cc: Cristian Greco


[-- Attachment #1.1: Type: text/plain, Size: 1070 bytes --]

Hi,

[ please keep CC as I'm not currently subscribed to the list ]

please find attached a small fix to check for root privileges in
acct(2) testcase (syscalls/acct/acct01.c).

Signed-off-by: Cristian Greco <cristian@regolo.cc>
---
 testcases/kernel/syscalls/acct/acct01.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/syscalls/acct/acct01.c
b/testcases/kernel/syscalls/acct/acct01.c index 221a30a..dae5598 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -67,6 +67,8 @@ char *argv[];
 
 /*--------------------------------------------------------------*/
 
+	tst_require_root(NULL);
+
 	/* turn off acct, so we are in a known state
 	 */
 	if (acct(NULL) == -1) {
@@ -171,4 +173,4 @@ char *argv[];
 	tst_exit();		/* THIS CALL DOES NOT RETURN -
EXITS!!
*/ /*--------------------------------------------------------------*/
tst_exit(); -}
\ No newline at end of file
+}
-- 
1.7.2.3

Thanks,
--
Cristian Greco
GPG key ID: 0xCF4D32E4

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 382 bytes --]

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-04  9:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 13:30 [LTP] [PATCH] Add tst_require_root to acct01 testcase Cristian Greco
2011-01-21  8:28 ` Garrett Cooper
2011-03-03 17:16   ` [LTP] [PATCH] syscalls: acct01: fix testcases [was: Re: [PATCH] Add tst_require_root to acct01 testcase.] Caspar Zhang
2011-03-03 17:42     ` Cristian Greco
2011-03-04  9:28     ` Garrett Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox