The c.c file is the same as check_simple_capset.c except config.h
is included in check_simple_capset.c. Moreover, it is not correct
to use HAVE_SYS_CAPABILITY_H without including config.h.

Signed-off-by: Yuan Sun <sunyu...@huawei.com>
---
 testcases/kernel/security/filecaps/c.c | 47 ----------------------------------
 1 file changed, 47 deletions(-)
 delete mode 100644 testcases/kernel/security/filecaps/c.c

diff --git a/testcases/kernel/security/filecaps/c.c 
b/testcases/kernel/security/filecaps/c.c
deleted file mode 100644
index 511e673..0000000
--- a/testcases/kernel/security/filecaps/c.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/******************************************************************************/
-/*                                                                            
*/
-/* Copyright (c) International Business Machines  Corp., 2008                 
*/
-/*                                                                            
*/
-/* This program is free software;  you can redistribute it and/or modify      
*/
-/* it under the terms of the GNU General Public License as published by       
*/
-/* the Free Software Foundation; either version 2 of the License, or          
*/
-/* (at your option) any later version.                                        
*/
-/*                                                                            
*/
-/* This program is distributed in the hope that it will be useful,            
*/
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            
*/
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  
*/
-/* the GNU General Public License for more details.                           
*/
-/*                                                                            
*/
-/* You should have received a copy of the GNU General Public License          
*/
-/* along with this program;  if not, write to the Free Software               
*/
-/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    */
-/*                                                                            
*/
-/******************************************************************************/
-
-#include <stdio.h>
-#if HAVE_SYS_CAPABILITY_H
-#include <linux/types.h>
-#include <sys/capability.h>
-#endif
-
-int main(void)
-{
-
-#ifdef HAVE_LIBCAP
-       cap_t caps, caps2;
-       int ret;
-
-       caps = cap_from_text("cap_setpcap+ep");
-       caps2 = cap_from_text("cap_setpcap+ep");
-       ret = cap_set_proc(caps);
-       ret = cap_compare(caps, caps2);
-       printf("Caps were %sthe same\n", ret ? "not " : "");
-
-       cap_free(caps);
-       cap_free(caps2);
-       return ret;
-#else
-       printf("System doesn't support full POSIX capabilities.\n");
-       return 1;
-#endif
-}
-- 
1.9.1


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to