cap_bounds_r.c build failure
Hi,
I tried to build by using yesterday's git.
(ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
But build failed in "cap_bounds_r.c" with following message.
------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/home/LTP/ltp-dev-20100401/testcases/kernel/include -I../../../../include
-I../../../../include -L../../../../lib cap_bounds_r.c -lltp -lcap -ocap_bounds_rcap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [cap_bounds_r] Error 1
------------
I tried to today's git, but it failed, too.
(ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)
I referd this source's diff in following URL.
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=commitdiff
;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
"CAP_LAST_CAP" definition is deleted with other definitions in this revision.
But "CAP_LAST_CAP" is still used after edited version.
"The editor may have deleted too much to make this source simple?" I think. ;-)
There is same problem in "cap_bounds_rw.c", too.
How about following patch?
Index: ./testcases/kernel/security/cap_bound/cap_bounds_r.c
============
--- ./testcases/kernel/security/cap_bound/cap_bounds_r.c 2010-03-31
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new 2010-04-01
15:43:01.000000000 +0900
@@ -32,6 +32,13 @@
#include <sys/prctl.h>
#include <test.h>
+#if HAVE_SYS_CAPABILITY_H
+#ifndef CAP_LAST_CAP
+#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif
+#endif
+
char *TCID = "cap_bounds_r";
int TST_TOTAL=1;
============
Index: ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
============
--- ./testcases/kernel/security/cap_bound/cap_bounds_rw.c 2010-03-31
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new 2010-04-01
15:44:39.000000000 +0900
@@ -31,6 +31,13 @@
#include <sys/prctl.h>
#include <test.h>
+#if HAVE_SYS_CAPABILITY_H
+#ifndef CAP_LAST_CAP
+#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif
+#endif
+
char *TCID = "cap_bounds_rw";
int TST_TOTAL=1;
============
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Mitani,
Can you confirm if you have installed libcap-devel ? As i see this is defined under linux/capability.h .
#define CAP_MAC_ADMIN 33
#define CAP_LAST_CAP CAP_MAC_ADMIN
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
Which unltimately is being called by sys/capability.h .
FYI, I did not get any compilation error on SLES11GA where:
libcap2-2.11-2.15
libcap-devel-2.11-2.15
-Rishi
Quoted 104 lines · Mitani
Hi,
I tried to build by using yesterday's git.
(ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
But build failed in "cap_bounds_r.c" with following message.------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall(quoted diff) +0
-2-I/home/LTP/ltp-dev-20100401/testcases/kernel/include -I../../../../include -I../../../../include -L../../../../lib cap_bounds_r.c -lltp -lcap -o
cap_bounds_rcap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [cap_bounds_r] Error 1
------------I tried to today's git, but it failed, too.
(ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)I referd this source's diff in following URL.
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=commitdiff
;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc"
CAP_LAST_CAP" definition is deleted with other definitions in this revision.
But "CAP_LAST_CAP" is still used after edited version."The editor may have deleted too much to make this source simple?" I think. ;-)
There is same problem in "
cap_bounds_rw.c", too.How about following patch?
Signed-off-by Tomonori Mitani <[email protected]>Index:
./testcases/kernel/security/cap_bound/cap_bounds_r.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_r.c2010-03-31
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new 2010-04-01
15:43:01.000000000 +0900(quoted diff) +7
-0@@ -32,6 +32,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_r"; int TST_TOTAL=1;============
Index:
./testcases/kernel/security/cap_bound/cap_bounds_rw.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_rw.c2010-03-31
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new 2010-04-01
15:44:39.000000000 +0900(quoted diff) +7
-0@@ -31,6 +31,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_rw"; int TST_TOTAL=1;============
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Signature · 16 lines
Thanks & Regards Rishi LTP Maintainer IBM, LTC, Bangalore Please join IRC #ltp @ irc.freenode.net ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Rishi,
"libcap-devel" was not installed in my system.
------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------
I'm trying to install libcap-devel now.
Thanks--
-Tomonori Mitani
Quoted 149 lines
-----Original Message-----
From: Rishikesh K Rajak [mailto:[email protected]]
Sent: Thursday, April 01, 2010 5:35 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureHi Mitani,
Can you confirm if you have installed libcap-devel ? As i see this is defined
underlinux/capability.h.#define
CAP_MAC_ADMIN33#define
CAP_LAST_CAPCAP_MAC_ADMIN#define
cap_valid(x)((x) >= 0 && (x) <=CAP_LAST_CAP)Which unltimately is being called by
sys/capability.h.FYI, I did not get any compilation error on SLES11GA where:
libcap2-2.11-2.15
libcap-devel-2.11-2.15-Rishi
Quoted 9 lines · Mitani
Hi,
I tried to build by using yesterday's git.
(ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
But build failed in "cap_bounds_r.c" with following message.------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/home/LTP/ltp-dev-20100401/testcases/kernel/include-I../../../../include
Quoted 1 line
-I../../../../include -L../../../../lib
cap_bounds_r.c-lltp -lcap -o
Quoted 3 lines
cap_bounds_rcap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use inthis
Quoted 2 lines
function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reportedonly once
Quoted 10 lines
cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [
cap_bounds_r] Error 1
------------I tried to today's git, but it failed, too.
(ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)I referd this source's diff in following URL.
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=
commitdiffQuoted 13 lines
;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
"
CAP_LAST_CAP" definition is deleted with other definitions in this revision.
But "CAP_LAST_CAP" is still used after edited version."The editor may have deleted too much to make this source simple?" I think. ;-)
There is same problem in "
cap_bounds_rw.c", too.Quoted 8 lines
How about following patch?
Signed-off-by Tomonori Mitani <[email protected]>Index:
./testcases/kernel/security/cap_bound/cap_bounds_r.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_r.c2010-03-31
Quoted 2 lines
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new2010-04-01
Quoted 17 lines
15:43:01.000000000 +0900
(quoted diff) +7
-0@@ -32,6 +32,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_r"; int TST_TOTAL=1;============
Quoted 3 lines
Index:
./testcases/kernel/security/cap_bound/cap_bounds_rw.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_rw.c2010-03-31
Quoted 2 lines
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new2010-04-01
Quoted 18 lines
15:44:39.000000000 +0900
(quoted diff) +7
-0@@ -31,6 +31,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_rw"; int TST_TOTAL=1;============
Quoted 7 lines
Regards--
-Tomonori Mitani
------------------------------------------------------------------
------------Quoted 9 lines
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 6 lines
--
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 5 lines · Mitani
Hi Rishi,
"libcap-devel" was not installed in my system.
Quoted 7 lines
------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------I'm trying to install libcap-devel now.
Ok, make sure you configure once again the source code after installing libcap-devel rpm.
-Rishi
Quoted 162 lines
Thanks--
-Tomonori Mitani
Quoted 155 lines
-----Original Message-----
From: Rishikesh K Rajak [mailto:[email protected]]
Sent: Thursday, April 01, 2010 5:35 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureHi Mitani,
Can you confirm if you have installed libcap-devel ? As i see this is defined
underlinux/capability.h.#define
CAP_MAC_ADMIN33#define
CAP_LAST_CAPCAP_MAC_ADMIN#define
cap_valid(x)((x) >= 0 && (x) <=CAP_LAST_CAP)Which unltimately is being called by
sys/capability.h.FYI, I did not get any compilation error on SLES11GA where:
libcap2-2.11-2.15
libcap-devel-2.11-2.15-Rishi
Quoted 9 lines · Mitani
Hi,
I tried to build by using yesterday's git.
(ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
But build failed in "cap_bounds_r.c" with following message.------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/home/LTP/ltp-dev-20100401/testcases/kernel/include-I../../../../include
Quoted 1 line
-I../../../../include -L../../../../lib
cap_bounds_r.c-lltp -lcap -o
Quoted 3 lines
cap_bounds_rcap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use inthis
Quoted 2 lines
function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reportedonly once
Quoted 10 lines
cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [
cap_bounds_r] Error 1
------------I tried to today's git, but it failed, too.
(ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)I referd this source's diff in following URL.
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=
commitdiffQuoted 13 lines
;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
"
CAP_LAST_CAP" definition is deleted with other definitions in this revision.
But "CAP_LAST_CAP" is still used after edited version."The editor may have deleted too much to make this source simple?" I think. ;-)
There is same problem in "
cap_bounds_rw.c", too.Quoted 8 lines
How about following patch?
Signed-off-by Tomonori Mitani <[email protected]>Index:
./testcases/kernel/security/cap_bound/cap_bounds_r.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_r.c2010-03-31
Quoted 2 lines
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new2010-04-01
Quoted 17 lines
15:43:01.000000000 +0900
(quoted diff) +7
-0@@ -32,6 +32,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_r"; int TST_TOTAL=1;============
Quoted 3 lines
Index:
./testcases/kernel/security/cap_bound/cap_bounds_rw.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_rw.c2010-03-31
Quoted 2 lines
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new2010-04-01
Quoted 18 lines
15:44:39.000000000 +0900
(quoted diff) +7
-0@@ -31,6 +31,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_rw"; int TST_TOTAL=1;============
Quoted 7 lines
Regards--
-Tomonori Mitani
------------------------------------------------------------------
------------Quoted 9 lines
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list--
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net
Signature · 16 lines
Thanks & Regards Rishi LTP Maintainer IBM, LTC, Bangalore Please join IRC #ltp @ irc.freenode.net ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Rishi,
I installed "libcap-devel", but after configure, build failed, too.
------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-devel-1.10-20
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------
"libcap-1.10-20" version is normal version in my system (RHEL4.8 2.6.9-89.ELsmp).
In this version, capability.h doesn't have CAP_LAST_CAP definition. I try to upgrade version "2.11".
Thanks--
-Tomonori Mitani
Quoted 196 lines
-----Original Message-----
From: Rishikesh K Rajak [mailto:[email protected]]
Sent: Thursday, April 01, 2010 6:35 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureQuoted 5 lines · Mitani
Hi Rishi,
"libcap-devel" was not installed in my system.
Quoted 7 lines
------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------I'm trying to install libcap-devel now.
Ok, make sure you configure once again the source code after installing libcap-devel rpm.
-Rishi
Quoted 16 lines
Thanks--
-Tomonori Mitani
Quoted 10 lines
-----Original Message-----
From: Rishikesh K Rajak [mailto:[email protected]]
Sent: Thursday, April 01, 2010 5:35 PM
To: Mitani
Cc: [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureHi Mitani,
Can you confirm if you have installed libcap-devel ? As i see this
is
Quoted 31 lines
Quoted 31 lines
defined
underlinux/capability.h.#define
CAP_MAC_ADMIN33#define
CAP_LAST_CAPCAP_MAC_ADMIN#define
cap_valid(x)((x) >= 0 && (x) <=CAP_LAST_CAP)Which unltimately is being called by
sys/capability.h.FYI, I did not get any compilation error on SLES11GA where:
libcap2-2.11-2.15
libcap-devel-2.11-2.15-Rishi
Quoted 9 lines · Mitani
Hi,
I tried to build by using yesterday's git.
(ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
But build failed in "cap_bounds_r.c" with following message.------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/home/LTP/ltp-dev-20100401/testcases/kernel/includeQuoted 6 lines
Quoted 6 lines
-I../../../../include
Quoted 1 line
-I../../../../include -L../../../../lib
cap_bounds_r.c-lltp -lcap -o
Quoted 3 lines
cap_bounds_rcap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first usein
Quoted 3 lines
Quoted 3 lines
this
Quoted 2 lines
function)
cap_bounds_r.c:46: error: (Each undeclared identifier isreported
Quoted 5 lines
Quoted 5 lines
only once
Quoted 4 lines
cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [
cap_bounds_r] Error 1
------------Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
I tried to today's git, but it failed, too.
(ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)I referd this source's diff in following URL.
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=
Quoted 4 lines
Quoted 4 lines
commitdiff
Quoted 3 lines
;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
"
CAP_LAST_CAP" definition is deleted with other definitions inthis
Quoted 64 lines
Quoted 64 lines
Quoted 10 lines
revision.
But "CAP_LAST_CAP" is still used after edited version."The editor may have deleted too much to make this source simple?" I think. ;-)
There is same problem in "
cap_bounds_rw.c", too.Quoted 8 lines
How about following patch?
Signed-off-by Tomonori Mitani <[email protected]>Index:
./testcases/kernel/security/cap_bound/cap_bounds_r.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_r.c2010-03-31
Quoted 2 lines
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new2010-04-01
Quoted 17 lines
15:43:01.000000000 +0900
(quoted diff) +7
-0@@ -32,6 +32,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_r"; int TST_TOTAL=1;============
Quoted 3 lines
Index:
./testcases/kernel/security/cap_bound/cap_bounds_rw.c
============
---./testcases/kernel/security/cap_bound/cap_bounds_rw.c2010-03-31
Quoted 2 lines
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new2010-04-01
Quoted 18 lines
15:44:39.000000000 +0900
(quoted diff) +7
-0@@ -31,6 +31,13 @@ #include <sys/prctl.h> #include <test.h> +#if HAVE_SYS_CAPABILITY_H +#ifndef CAP_LAST_CAP +#warning out-of-date capability.h does not define CAP_LAST_CAP +#define CAP_LAST_CAP 28 /* be ultra-conservative */ +#endif +#endif + char *TCID = "cap_bounds_rw"; int TST_TOTAL=1;============
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Regards--
-Tomonori Mitani
------------------------------------------------------------------
Quoted 3 lines
Quoted 3 lines
------------
Quoted 2 lines
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, findbugs
Quoted 1 line
Quoted 1 line
Quoted 1 line
proactively, and fine-tune applications for parallel
performance.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-listQuoted 7 lines
Quoted 6 lines
--
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net
Quoted 6 lines
--
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 11 lines · Mitani
Hi Rishi,
I installed "libcap-devel", but after configure, build failed, too.
------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-devel-1.10-20
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------
Quoted 4 lines
"libcap-1.10-20" version is normal version in my system (RHEL4.8 2.6.9-89.ELsmp).
In this version,capability.hdoesn't haveCAP_LAST_CAPdefinition. I try to upgrade version "2.11".
Yeah, you need libcap2 for these tests. I guess we could stand to add a rule to m4/ltp-cap.m4 to check for the existance of libcap.so.2.X, X > oh say 12.
-serge
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi,
I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11". My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.
I downloaded "libcap-2.11.tar.gz" from following URL :
ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2
I extended it, and I confirmed that there are ".../libcap/include/ linux/capability.h" and ".../libcap/include/sys/capability.h" . ".../libcap/include/linux/capability.h" has "CAP_LAST_CAP" definition.
I did "make" and "make install".
But "/usr/include/linux/capability.h" was not changed.
the "README" of "libcap-2.11" shows follows:
------------
# INSTALLATION
Linux-Caps % make
builds the library and the programs
Linux-Caps % make install
installs the library libcap.XX.Y in /lib/ the binaries in /sbin/
the <sys/capability.h> file in /usr/include
------------
It doesn't mention about "/usr/include/linux/capability.h" . In fact, "/usr/include/sys/capability.h" was replaced, but "/usr/include/linux/capability.h" was not.
I checked where <linux/capability.h> came from, and knew that "/usr/include/linux/capability.h" is from "glibc-kernheaders" :
------------
[root@RHEL4-8 cap_bound]# rpm -qf /usr/include/linux/capability.h glibc-kernheaders-2.4-9.1.103.EL
[root@RHEL4-8 cap_bound]#
------------
There are two ways to upgrade "/usr/include/linux/capability.h" in RHEL system, I think.
1) Upgrade "glibc-kernheaders".
2) Replace manually "/usr/include/sys/capability.h" with "linux/capability.h" of "libcap-2.11".
1) "glibc-kernheaders" is referenced from many modules of kernel. If I want to upgrade "glibc-kernheaders", kernel upgrade is needed, I think.
It deviates from an original purpose (I want to test RHEL4.8 system).
2) Manually replace is not an original way and it is dangerous.
First of all, I replaced manually "/usr/include/linux/capability.h" . And I succeeded to build "cap_bounds_r.c" and "cap_bounds_r.c".
But upgrading "libcap" in RHEL system still includes the above problems, I think
------
After this, another build failed.
But it is different from above problems, I think.
Therfore, I will report it another thread.
Regards--
-Tomonori Mitani
Quoted 24 lines
-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Friday, April 02, 2010 12:27 AM
To: Mitani
Cc: 'Rishikesh K Rajak'; [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureQuoted 11 lines · Mitani
Hi Rishi,
I installed "libcap-devel", but after configure, build failed, too.
------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-devel-1.10-20
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------Quoted 4 lines
"libcap-1.10-20" version is normal version in my system (RHEL4.8 2.6.9-89.ELsmp).
In this version,capability.hdoesn't haveCAP_LAST_CAPdefinition. I try to upgrade version "2.11".
Quoted 5 lines
Yeah, you need libcap2 for these tests. I guess we could stand to add a rule to m4/ltp-cap.m4 to check for the existance of libcap.so.2.X, X > oh say 12.
-serge
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 5 lines · Mitani
Hi,
I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11". My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.
Oh, I'm sorry, I misunderstood from the first. I thought you wanted to test a modern kernel on an older distro. So the real problem in your original email wasn't that cap_bounds_r.c wouldn't compile, but that it tried to compile.
Maybe the attached ltp patch will do a better job of not trying to compile. Though I'm not sure what is the best way to detect both 64-bit caps in kernel and libcap2 userspace.
-serge
Date: Mon, 5 Apr 2010 08:17:46 -0500
Subject: [PATCH ltp] don't compile cap_bounds on older systems
Only define HAVE_LIBCAP for libcap2 and 64-bit caps.
--- m4/ltp-cap.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
m4/ltp-cap.m4 +1 -1
@@ -27,7 +27,7 @@ AH_TEMPLATE(HAVE_LIBCAP, [Define to 1 if you have libcap-2 installed.]) AC_CHECK_HEADERS(sys/capability.h,[ LTP_CAPABILITY_SUPPORT=yes - AC_CHECK_LIB(cap,cap_compare,[AC_DEFINE(HAVE_LIBCAP) CAP_LIBS="-lcap"], [CAP_LIBS=""]) + AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP) CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"]) AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false) ])] AC_SUBST(CAP_LIBS)
Signature · 13 lines
1.6.3.3 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi,
Thank you for your help.
I tried to "make" with Serge's patch in my system. But, sorry, it failed.
---
I did with following procedure:
1) I did "make" and "make install" of "libcap-2.11" .
2) I confirmed about following files.
------------
[root@RHEL4-8 include]# pwd/usr/include
[root@RHEL4-8 include]# ls -l sys/capability.h -rw-r--r-- 1 root root 3345 Apr 9 15:44 sys/capability.h [root@RHEL4-8 include]# ls -l linux/capability.h -rw-r--r-- 1 root root 8273 May 14 2008 linux/capability.h [root@RHEL4-8 include]#
------------
"sys/capability.h" replased by "libcap-2.11" .
3) I applied patch to "m4/ltp-cap.m4", and confirmed it.
------------
...
AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[ AH_TEMPLATE(HAVE_LIBCAP,
[Define to 1 if you have libcap-2 installed.]) AC_CHECK_HEADERS(sys/capability.h,[
LTP_CAPABILITY_SUPPORT=yes AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)
CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
])]AC_SUBST(CAP_LIBS)
)
------------
4) I did "./configure", and confirmed "configure.log" .
------------
...
| #define HAVE_SYS_CAPABILITY_H 1 | #define HAVE_LIBCAP 1 | #define HAVE_SYS_PRCTL_H 1 | #define HAVE_DECL_PR_CAPBSET_DROP 0 | #define HAVE_DECL_PR_CAPBSET_READ 0
...
------------
"HAVE_LIBCAP" define was ON.
5) I tried to "make", but it failed as foliows.
------------cap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [cap_bounds_r] Error 1
------------
I don't know about configure well, and I examine it.
Thank you--
-Tomonori Mitani
Quoted 49 lines
-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Monday, April 05, 2010 10:20 PM
To: Mitani
Cc: Rishikesh K Rajak; Andrew Morgan; Garrett Cooper; [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureQuoted 5 lines · Mitani
Hi,
I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11". My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.
Oh, I'm sorry, I misunderstood from the first. I thought you wanted to test a modern kernel on an older distro. So the real problem in your original email wasn't that
cap_bounds_r.cwouldn't compile, but that it tried to compile.Maybe the attached ltp patch will do a better job of not trying to compile. Though I'm not sure what is the best way to detect both 64-bit caps in kernel and libcap2 userspace.
-serge
Date: Mon, 5 Apr 2010 08:17:46 -0500
Subject: [PATCH ltp] don't compilecap_boundson older systemsOnly define
HAVE_LIBCAPfor libcap2 and 64-bit caps.Signed-off-by Serge Hallyn <[email protected]>--- m4/ltp-cap.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)m4/ltp-cap.m4 +1
-1@@ -27,7 +27,7 @@ AH_TEMPLATE(HAVE_LIBCAP, [Define to 1 if you have libcap-2 installed.]) AC_CHECK_HEADERS(sys/capability.h,[ LTP_CAPABILITY_SUPPORT=yes - AC_CHECK_LIB(cap,cap_compare,[AC_DEFINE(HAVE_LIBCAP) CAP_LIBS="-lcap"], [CAP_LIBS=""]) + AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP) CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"]) AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
Quoted 4 lines
])]
AC_SUBST(CAP_LIBS)
--
1.6.3.3
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 118 lines · Mitani
Hi,
Thank you for your help.
I tried to "make" with Serge's patch in my system. But, sorry, it failed.
---
I did with following procedure:
1) I did "make" and "make install" of "libcap-2.11" .
2) I confirmed about following files.
------------
[root@RHEL4-8 include]# pwd/usr/include
[root@RHEL4-8 include]# ls -lsys/capability.h-rw-r--r-- 1 root root 3345 Apr 9 15:44sys/capability.h[root@RHEL4-8 include]# ls -llinux/capability.h-rw-r--r-- 1 root root 8273 May 14 2008linux/capability.h[root@RHEL4-8 include]#
------------
"sys/capability.h" replased by "libcap-2.11" .3) I applied patch to "m4/ltp-cap.m4", and confirmed it.
------------
...
AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[ AH_TEMPLATE(HAVE_LIBCAP,
[Define to 1 if you have libcap-2 installed.]) AC_CHECK_HEADERS(sys/capability.h,[
LTP_CAPABILITY_SUPPORT=yes AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)
CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
])]AC_SUBST(CAP_LIBS)
)
------------4) I did "./configure", and confirmed "configure.log" .
------------
...| #define HAVE_SYS_CAPABILITY_H 1 | #define HAVE_LIBCAP 1 | #define HAVE_SYS_PRCTL_H 1 | #define HAVE_DECL_PR_CAPBSET_DROP 0 | #define HAVE_DECL_PR_CAPBSET_READ 0...
------------
"HAVE_LIBCAP" define was ON.5) I tried to "make", but it failed as foliows.
------------cap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once cap_bounds_r.c:46: error: for each function it appears in.) make[4]: *** [cap_bounds_r] Error 1
------------I don't know about configure well, and I examine it.
Thank you--
-Tomonori Mitani
Quoted 45 lines
-----Original Message-----
From: Serge E. Hallyn [mailto:[email protected]]
Sent: Monday, April 05, 2010 10:20 PM
To: Mitani
Cc: Rishikesh K Rajak; Andrew Morgan; Garrett Cooper; [email protected]
Subject: Re: [LTP]cap_bounds_r.cbuild failureQuoted 5 lines · Mitani
Hi,
I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11". My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.
Oh, I'm sorry, I misunderstood from the first. I thought you wanted to test a modern kernel on an older distro. So the real problem in your original email wasn't that
cap_bounds_r.cwouldn't compile, but that it tried to compile.Maybe the attached ltp patch will do a better job of not trying to compile. Though I'm not sure what is the best way to detect both 64-bit caps in kernel and libcap2 userspace.
-serge
Date: Mon, 5 Apr 2010 08:17:46 -0500
Subject: [PATCH ltp] don't compilecap_boundson older systemsOnly define
HAVE_LIBCAPfor libcap2 and 64-bit caps.Signed-off-by Serge Hallyn <[email protected]>---
m4/ltp-cap.m4 | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)m4/ltp-cap.m4 +0
-0@@ -27,7 +27,7 @@ AH_TEMPLATE(HAVE_LIBCAP, [Define to 1 if you have libcap-2 installed.])AC_CHECK_HEADERS(sys/capability.h,[
LTP_CAPABILITY_SUPPORT=yesm4/ltp-cap.m4 +0
-1- AC_CHECK_LIB(cap,cap_compare,[AC_DEFINE(HAVE_LIBCAP)
Quoted 8 lines
Quoted 8 lines
CAP_LIBS="-lcap"], [CAP_LIBS=""])
m4/ltp-cap.m4 +1
-0+ AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "
linux/capability.h"])
AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
])]AC_SUBST(CAP_LIBS)
--
1.6.3.3
All of the necessary details are in INSTALL.
HTH,
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list