From: Sachin Sant <sachinp@in.ibm.com>
To: serue@linux.vnet.ibm.com
Cc: ltp-list@lists.sf.net
Subject: [LTP] [PATCH] Fix Security/Filecaps Build failure.
Date: Fri, 03 Jul 2009 16:05:41 +0530 [thread overview]
Message-ID: <4A4DDEFD.1050506@in.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
Fix Filecaps build break.
inh_capped.c:70: error: too many arguments to function ‘tst_exit’
Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
---
thanks
-Sachin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix-june-ltp-filecaps-build-break.patch --]
[-- Type: text/x-patch; name="fix-june-ltp-filecaps-build-break.patch", Size: 4138 bytes --]
Fix Filecaps build break.
inh_capped.c:70: error: too many arguments to function ‘tst_exit’
Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
---
diff -Naurp a/testcases/kernel/security/filecaps/inh_capped.c b/testcases/kernel/security/filecaps/inh_capped.c
--- a/testcases/kernel/security/filecaps/inh_capped.c 2008-01-23 19:15:04.000000000 +0530
+++ b/testcases/kernel/security/filecaps/inh_capped.c 2009-07-03 15:21:02.000000000 +0530
@@ -67,14 +67,14 @@ int main()
debug_print_caps("after raising all caps");
if (ret) {
tst_resm(TFAIL, "failed to raise all caps");
- tst_exit(ret);
+ tst_exit();
}
ret = set_caps_from_text("all=iep cap_sys_admin-iep");
debug_print_caps("after first drop cap_sys_admin");
if (ret) {
tst_resm(TFAIL, "failed to drop capsysadmin from pI");
- tst_exit(ret);
+ tst_exit();
}
/* we can't regain cap_sys_admin in pE or pP, only pI */
@@ -82,14 +82,14 @@ int main()
debug_print_caps("after first raise cap_sys_admin");
if (ret) {
tst_resm(TFAIL, "failed to raise capsysadmin in pI");
- tst_exit(ret);
+ tst_exit();
}
ret = set_caps_from_text("all=ip cap_setpcap-e+ip cap_sys_admin+i-ep");
debug_print_caps("after drop cappset");
if (ret) {
tst_resm(TFAIL, "failed to drop cappset from pE");
- tst_exit(ret);
+ tst_exit();
}
ret = set_caps_from_text("all=iep cap_sys_admin-iep cap_setpcap-e+ip");
@@ -97,17 +97,17 @@ int main()
if (ret) {
tst_resm(TFAIL, "failed to drop capsysadmin from pI "
"after dropping cappset from pE");
- tst_exit(ret);
+ tst_exit();
}
ret = set_caps_from_text("all=iep cap_sys_admin-ep+i cap_setpcap-e+ip");
debug_print_caps("final");
if (ret) {
tst_resm(TPASS, "pI is properly capped\n");
- tst_exit(0);
+ tst_exit();
}
tst_resm(TFAIL, "succeeded raising capsysadmin in pI "
"without having setpcap");
- tst_exit(ret);
+ tst_exit();
}
diff -Naurp a/testcases/kernel/security/filecaps/verify_caps_exec.c b/testcases/kernel/security/filecaps/verify_caps_exec.c
--- a/testcases/kernel/security/filecaps/verify_caps_exec.c 2008-09-30 15:00:56.000000000 +0530
+++ b/testcases/kernel/security/filecaps/verify_caps_exec.c 2009-07-03 15:21:38.000000000 +0530
@@ -54,7 +54,7 @@ void usage(char *me)
tst_resm(TFAIL, "Usage: %s <0|1> [arg]\n", me);
tst_resm(TINFO, " 0: set file caps without privilege\n");
tst_resm(TINFO, " 1: test that file caps are set correctly on exec\n");
- tst_exit(1);
+ tst_exit();
}
#define DROP_PERMS 0
@@ -79,7 +79,7 @@ int drop_root(int keep_perms)
if (ret) {
perror("setresuid");
tst_resm(TFAIL, "Error dropping root privs\n");
- tst_exit(4);
+ tst_exit();
}
if (keep_perms) {
cap_t cap = cap_from_text("=eip");
@@ -123,7 +123,7 @@ void create_fifo(void)
if (ret == -1 && errno != EEXIST) {
perror("mkfifo");
tst_resm(TFAIL, "failed creating %s\n", FIFOFILE);
- tst_exit(1);
+ tst_exit();
}
}
@@ -145,7 +145,7 @@ void read_from_fifo(char *buf)
if (fd < 0) {
perror("open");
tst_resm(TFAIL, "Failed opening fifo\n");
- tst_exit(1);
+ tst_exit();
}
read(fd, buf, 199);
close(fd);
@@ -164,7 +164,7 @@ int fork_drop_and_exec(int keepperms, ca
if (pid < 0) {
perror("fork");
tst_resm(TFAIL, "%s: failed fork\n", __FUNCTION__);
- tst_exit(1);
+ tst_exit();
}
if (pid == 0) {
drop_root(keepperms);
@@ -177,7 +177,7 @@ int fork_drop_and_exec(int keepperms, ca
snprintf(buf, 200, "failed to run as %s\n", capstxt);
cap_free(capstxt);
write_to_fifo(buf);
- tst_exit(1);
+ tst_exit();
} else {
p = buf;
while (1) {
@@ -192,7 +192,7 @@ int fork_drop_and_exec(int keepperms, ca
p = index(buf, '.')+1;
if (p==(char *)1) {
tst_resm(TFAIL, "got a bad message from print_caps\n");
- tst_exit(1);
+ tst_exit();
}
actual_caps = cap_from_text(p);
if (cap_compare(actual_caps, expected_caps) != 0) {
@@ -396,5 +396,5 @@ int main(int argc, char *argv[])
default: usage(argv[0]);
}
- tst_exit(ret);
+ tst_exit();
}
[-- Attachment #3: Type: text/plain, Size: 79 bytes --]
------------------------------------------------------------------------------
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2009-07-03 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 10:35 Sachin Sant [this message]
2009-07-06 15:50 ` [LTP] [PATCH] Fix Security/Filecaps Build failure Subrata Modak
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=4A4DDEFD.1050506@in.ibm.com \
--to=sachinp@in.ibm.com \
--cc=ltp-list@lists.sf.net \
--cc=serue@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox