Quoting Pradeep K Surisetty ([EMAIL PROTECTED]):
>                                                                            
>              "Serge E. Hallyn"                                             
>              <[EMAIL PROTECTED]                                             
>              >                                                          To 
>                                        Pradeep K Surisetty/India/[EMAIL 
> PROTECTED] 
>              02/04/2008 08:13                                           cc 
>              PM                        [EMAIL PROTECTED],         
>                                        ltp-list                            
>                                        <[email protected]>,   
>                                        [EMAIL PROTECTED], psuriset       
>                                        <[EMAIL PROTECTED]>       
>                                                                    Subject 
>                                        Re: [LTP]  : tp-full-20071231:      
>                                        Build Failure on filecaps           
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> 
> 
> 
> Quoting Pradeep K Surisetty ([EMAIL PROTECTED]):
> > Hi All,
> >
> > It should be a highest priority issue as latest LTP is not getting
> > compiled.
> > I just dowloaded latest LTP and compiled it.
> >
> > Machine details:
> >
> > iam running on SUSE LINUX Enterprise Server 9 ,ppc64
> >
> >
> >
> >
> > verify_caps_exec.c:38:24: attr/xattr.h: No such file or directory
> > verify_caps_exec.c: In function `perms_test':
> > verify_caps_exec.c:124: warning: implicit declaration of function
> > `setxattr'
> 
> >>Can you type 'which setcap' and tell me the result?
> 
> 
> >>thanks,
> >>-serge
> 
> >>serge
> 
> linux:/home/ltp-full-20080131 # which setcap
> /sbin/setcap
> linux:/home/ltp-full-20080131 #
> 
> regards
> pradeep
> 
> > verify_caps_exec.c: In function `main':
> > verify_caps_exec.c:440: warning: control reaches end of non-void function
> > make[4]: *** [verify_caps_exec] Error 1
> > make[4]: Leaving directory
> > `/home/ltp-full-20080131/testcases/kernel/security/filecaps'
> > make[3]: *** [all] Error 2
> > make[3]: Leaving directory
> > `/home/ltp-full-20080131/testcases/kernel/security'
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory `/home/ltp-full-20080131/testcases/kernel'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/home/ltp-full-20080131/testcases'
> > make: *** [all] Error 2
> >
> >
> > Regards
> > pradeep

Could you try the following patch?

thanks,
-serge

>From 8637f84892c139608f530b3aa7e69c67802ebafb Mon Sep 17 00:00:00 2001
From: Serge E. Hallyn <[EMAIL PROTECTED]>
Date: Mon, 4 Feb 2008 10:56:53 -0500
Subject: [PATCH 1/1] Detect lack of xattr headers

Don't compile filecap tests if we dont' have xattr headers.

Signed-off-by: Serge E. Hallyn <[EMAIL PROTECTED]>
---
 testcases/kernel/security/filecaps/Makefile        |    2 +-
 testcases/kernel/security/filecaps/check_xattr.c   |    9 +++++++++
 .../kernel/security/filecaps/checkforlibcap.sh     |    9 +++++++++
 3 files changed, 19 insertions(+), 1 deletions(-)
 create mode 100644 testcases/kernel/security/filecaps/check_xattr.c

diff --git a/testcases/kernel/security/filecaps/Makefile 
b/testcases/kernel/security/filecaps/Makefile
index 4d49896..4896708 100644
--- a/testcases/kernel/security/filecaps/Makefile
+++ b/testcases/kernel/security/filecaps/Makefile
@@ -12,7 +12,7 @@ all: $(TARGETS)
        gcc -o checkforlibcap gotlibcap.c
 else
 all:
-       @echo "setcap not installed.  Please install libcap from"; echo 
"ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2";; echo "Then 
make clean in ltp or ltp/testcases/kernel/security/filecaps, and recompile ltp."
+       @echo "setcap or xattr headers not installed.  Please install libcap 
from"; echo "ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2";; 
echo "Then make clean in ltp or ltp/testcases/kernel/security/filecaps, and 
recompile ltp."
        gcc -o checkforlibcap nolibcap.c
 TARGETS =
 endif
diff --git a/testcases/kernel/security/filecaps/check_xattr.c 
b/testcases/kernel/security/filecaps/check_xattr.c
new file mode 100644
index 0000000..55c6421
--- /dev/null
+++ b/testcases/kernel/security/filecaps/check_xattr.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+#include <sys/capability.h>
+#include <attr/xattr.h>
+
+int main()
+{
+       printf("Hello, world\n");
+       return 0;
+}
diff --git a/testcases/kernel/security/filecaps/checkforlibcap.sh 
b/testcases/kernel/security/filecaps/checkforlibcap.sh
index e41ecd4..a43dd1a 100755
--- a/testcases/kernel/security/filecaps/checkforlibcap.sh
+++ b/testcases/kernel/security/filecaps/checkforlibcap.sh
@@ -12,6 +12,15 @@ if [ $ret -eq 0 ]; then
        ret=$?
 fi
 
+if [ $ret -eq 0 ]; then
+       #also test for xattr
+       gcc -o check_xattr check_xattr.c 
+       ret=$?
+       if [ $ret -ne 0 ]; then
+               echo "Please install xattr headers"
+       fi
+fi
+
 if [ $ret -ne 0 ]; then
        if [ $yesno -eq 1 ]; then
                echo no
-- 
1.5.1.1.GIT


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to