added the fc3 rpmlist.d directory + content
[util-vserver.git] / util-vserver / src / reducecap.c
index 7cf0842..1dca269 100644 (file)
 #include <getopt.h>
 #include <sys/param.h>
 
-#include "linuxcaps.h"
-
 #define ENSC_WRAPPERS_PREFIX   "reducecap: "
 #define ENSC_WRAPPERS_VSERVER  1
 #define ENSC_WRAPPERS_UNISTD   1
 #include <wrappers.h>
 
 
+#undef _POSIX_SOURCE
+#include "capability-compat.h"
+
+
 #define CMD_HELP       0x1000
 #define CMD_VERSION    0x1001
 
@@ -138,9 +140,6 @@ CMDLINE_OPTIONS[] = {
 
 int wrapper_exit_code  = 255;
 
-extern int capget (struct __user_cap_header_struct *, struct __user_cap_data_struct *);
-extern int capset (struct __user_cap_header_struct *, struct __user_cap_data_struct *);
-
 static void
 showHelp(int fd, char const *cmd, int res)
 {
@@ -249,7 +248,7 @@ int main (int argc, char *argv[])
     switch (c) {
       case CMD_HELP            :  showHelp(1, argv[0], 0);
       case CMD_VERSION         :  showVersion();
-      case CMD_SECURE          :  remove  = vc_get_insecurecaps(); break;
+      case CMD_SECURE          :  remove  = vc_get_insecurebcaps(); break;
       case CMD_SHOW            :  do_show = true;  break; 
       case CMD_PID             :  pid     = atoi(optarg);   break;
       case CMD_CAP             :  remove  = getCap(optarg); break;