public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] filecaps: Remove unnecessary c.c file.
@ 2015-07-01  5:16 Yuan Sun
  2015-07-01  5:24 ` Yuan Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Yuan Sun @ 2015-07-01  5:16 UTC (permalink / raw)
  To: jstancek; +Cc: ltp-list

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 <sunyuan3@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-01  5:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01  5:16 [LTP] [PATCH] filecaps: Remove unnecessary c.c file Yuan Sun
2015-07-01  5:24 ` Yuan Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox