View | Details | Raw Unified
Collapse All | Expand All

(-) libcap-1.10.static/libcap/include/sys/capability.h (+16 lines)
 Lines 15-27    Link Here 
extern "C" {
extern "C" {
#endif
#endif
#ifdef SWIG
%module libcap
#endif
/*
/*
 * This file complements the kernel file by providing prototype
 * This file complements the kernel file by providing prototype
 * information for the user library.
 * information for the user library.
 */
 */
#ifdef SWIG
%{
#include <sys/types.h>
#include <linux/capability.h>
#include "libcap.h"
%}
#else
#include <sys/types.h>
#include <sys/types.h>
#include <linux/capability.h>
#include <linux/capability.h>
#endif
/*
/*
 * POSIX capability types
 * POSIX capability types
 Lines 73-82    Link Here 
int     cap_clear(cap_t);
int     cap_clear(cap_t);
/* libcap/cap_file.c */
/* libcap/cap_file.c */
#ifndef SWIG
cap_t   cap_get_fd(int);
cap_t   cap_get_fd(int);
cap_t   cap_get_file(const char *);
cap_t   cap_get_file(const char *);
int     cap_set_fd(int, cap_t);
int     cap_set_fd(int, cap_t);
int     cap_set_file(const char *, cap_t);
int     cap_set_file(const char *, cap_t);
#endif
/* libcap/cap_proc.c */
/* libcap/cap_proc.c */
cap_t   cap_get_proc(void);
cap_t   cap_get_proc(void);
 Lines 96-101    Link Here 
 * if the following _POSIX_SOURCE is _undefined_
 * if the following _POSIX_SOURCE is _undefined_
 */
 */
#ifndef SWIG
#if !defined(_POSIX_SOURCE)
#if !defined(_POSIX_SOURCE)
extern int capset(cap_user_header_t header, cap_user_data_t data);
extern int capset(cap_user_header_t header, cap_user_data_t data);
 Lines 105-110    Link Here 
extern char const *_cap_names[];
extern char const *_cap_names[];
#endif /* !defined(_POSIX_SOURCE) */
#endif /* !defined(_POSIX_SOURCE) */
#endif
#ifdef __cplusplus
#ifdef __cplusplus
}
}
(-) libcap-1.10.static/libcap/Makefile (-2 / +17 lines)
 Lines 31-36    Link Here 
#
#
LIBNAME=libcap.so
LIBNAME=libcap.so
STATLIBNAME=libcap.a
STATLIBNAME=libcap.a
PYTHONMODNAME=libcapmodule.so
#
#
FILES=cap_alloc cap_proc cap_extint cap_flag cap_text cap_sys
FILES=cap_alloc cap_proc cap_extint cap_flag cap_text cap_sys
 Lines 43-49    Link Here 
MAJLIBNAME=$(LIBNAME).$(VERSION)
MAJLIBNAME=$(LIBNAME).$(VERSION)
MINLIBNAME=$(MAJLIBNAME).$(MINOR)
MINLIBNAME=$(MAJLIBNAME).$(MINOR)
all: $(STATLIBNAME) $(MINLIBNAME)
ifdef PYTHON
all: $(MINLIBNAME) $(PYTHONMODNAME) $(STATLIBNAME)
else
all: $(MINLIBNAME) $(STATLIBNAME)
endif
_makenames: _makenames.c cap_names.sed
_makenames: _makenames.c cap_names.sed
	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
 Lines 61-66    Link Here 
	ln -sf $(MINLIBNAME) $(MAJLIBNAME)
	ln -sf $(MINLIBNAME) $(MAJLIBNAME)
	ln -sf $(MAJLIBNAME) $(LIBNAME)
	ln -sf $(MAJLIBNAME) $(LIBNAME)
libcap_wrap.c: include/sys/capability.h
	swig -python -o libcap_wrap.c include/sys/capability.h
$(PYTHONMODNAME): $(OBJS) libcap_wrap.o
	$(LD) -x -shared -o $@ libcap_wrap.o $(OBJS)
$(STATLIBNAME): $(OBJS)
$(STATLIBNAME): $(OBJS)
	ar rs $@ $(OBJS)
	ar rs $@ $(OBJS)
 Lines 76-85    Link Here 
	ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
	ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
	ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
	ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
	-/sbin/ldconfig
	-/sbin/ldconfig
ifdef PYTHON
	mkdir -p $(PYTHONMODDIR)
	install -m 0644 $(PYTHONMODNAME) $(PYTHONMODDIR)/$(PYTHONMODNAME)
endif
clean:
clean:
	$(LOCALCLEAN)
	$(LOCALCLEAN)
	rm -f $(OBJS) $(LIBNAME)*
	rm -f $(OBJS) $(LIBNAME)*
	rm -f cap_names.h cap_names.sed _makenames
	rm -f cap_names.h cap_names.sed _makenames libcap_wrap.c
	cd include/sys && $(LOCALCLEAN)
	cd include/sys && $(LOCALCLEAN)
(-) libcap-1.10.static/Make.Rules (+1 lines)
 Lines 33-38    Link Here 
SBINDIR=$(FAKEROOT)$(exec_prefix)/sbin
SBINDIR=$(FAKEROOT)$(exec_prefix)/sbin
INCDIR=$(FAKEROOT)$(inc_prefix)/include
INCDIR=$(FAKEROOT)$(inc_prefix)/include
LIBDIR=$(FAKEROOT)$(lib_prefix)/lib
LIBDIR=$(FAKEROOT)$(lib_prefix)/lib
PYTHONMODDIR=$(FAKEROOT)$(prefix)/lib/python/site-packages
# common defines for libcap (suitable for 2.2.1+ Linux kernels)
# common defines for libcap (suitable for 2.2.1+ Linux kernels)
VERSION=1
VERSION=1