All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Greco <cristian@regolo.cc>
To: ltp-list@lists.sourceforge.net
Cc: Cristian Greco <cristian@regolo.cc>
Subject: [LTP] [PATCH] Add tst_require_root to acct01 testcase.
Date: Thu, 20 Jan 2011 14:30:28 +0100	[thread overview]
Message-ID: <20110120143028.4df7ab81@regolo> (raw)


[-- 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

             reply	other threads:[~2011-01-20 13:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 13:30 Cristian Greco [this message]
2011-01-21  8:28 ` [LTP] [PATCH] Add tst_require_root to acct01 testcase 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110120143028.4df7ab81@regolo \
    --to=cristian@regolo.cc \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.