003 File Manager
Current Path:
/usr/src/contrib/capsicum-test
usr
/
src
/
contrib
/
capsicum-test
/
📁
..
📄
.gitignore
(235 B)
📄
CONTRIBUTING.md
(880 B)
📄
GNUmakefile
(2.22 KB)
📄
LICENSE
(1.4 KB)
📄
README.md
(2.7 KB)
📄
capability-fd-pair.cc
(5.52 KB)
📄
capability-fd.cc
(42.15 KB)
📄
capmode.cc
(19.24 KB)
📄
capsicum-freebsd.h
(1.97 KB)
📄
capsicum-linux.h
(1.17 KB)
📄
capsicum-rights.h
(2.86 KB)
📄
capsicum-test-main.cc
(4.23 KB)
📄
capsicum-test.cc
(2.63 KB)
📄
capsicum-test.h
(9.9 KB)
📄
capsicum.h
(4.49 KB)
📄
fcntl.cc
(14.48 KB)
📄
fexecve.cc
(6.08 KB)
📄
ioctl.cc
(6.93 KB)
📄
linux.cc
(48.75 KB)
📄
makefile
(1.59 KB)
📄
mini-me.c
(1.04 KB)
📄
mqueue.cc
(3.24 KB)
📄
openat.cc
(14.52 KB)
📄
overhead.cc
(1.28 KB)
📄
procdesc.cc
(26.95 KB)
📄
rename.cc
(1.59 KB)
📄
sctp.cc
(7.14 KB)
📄
select.cc
(4 KB)
📄
showrights
(4.81 KB)
📄
smoketest.c
(4.86 KB)
📄
socket.cc
(10.56 KB)
📄
syscalls.h
(8.36 KB)
📄
sysctl.cc
(403 B)
📄
waittest.c
(1 KB)
Editing: GNUmakefile
OS:=$(shell uname) # Set ARCH to 32 or x32 for i386/x32 ABIs ARCH?=64 ARCHFLAG=-m$(ARCH) ifeq ($(OS),Linux) PROCESSOR:=$(shell uname -p) ifneq ($(wildcard /usr/lib/$(PROCESSOR)-linux-gnu),) # Can use standard Debian location for static libraries. PLATFORM_LIBDIR=/usr/lib/$(PROCESSOR)-linux-gnu else # Attempt to determine library location from gcc configuration. PLATFORM_LIBDIR=$(shell gcc -v 2>&1 | grep "Configured with:" | sed 's/.*--libdir=\(\/usr\/[^ ]*\).*/\1/g') endif # Override for explicitly specified ARCHFLAG. # Use locally compiled libcaprights in this case, on the # assumption that any installed version is 64-bit. ifeq ($(ARCHFLAG),-m32) PROCESSOR=i386 PLATFORM_LIBDIR=/usr/lib32 LIBCAPRIGHTS=./libcaprights.a endif ifeq ($(ARCHFLAG),-mx32) PROCESSOR=x32 PLATFORM_LIBDIR=/usr/libx32 LIBCAPRIGHTS=./libcaprights.a endif # Detect presence of libsctp in normal Debian location ifneq ($(wildcard $(PLATFORM_LIBDIR)/libsctp.a),) LIBSCTP=-lsctp CXXFLAGS=-DHAVE_SCTP endif ifneq ($(LIBCAPRIGHTS),) # Build local libcaprights.a (assuming ./configure # has already been done in libcaprights/) LOCAL_LIBS=$(LIBCAPRIGHTS) LIBCAPRIGHTS_OBJS=libcaprights/capsicum.o libcaprights/linux-bpf-capmode.o libcaprights/procdesc.o libcaprights/signal.o LOCAL_CLEAN=$(LOCAL_LIBS) $(LIBCAPRIGHTS_OBJS) else # Detect installed libcaprights static library. ifneq ($(wildcard $(PLATFORM_LIBDIR)/libcaprights.a),) LIBCAPRIGHTS=$(PLATFORM_LIBDIR)/libcaprights.a else ifneq ($(wildcard /usr/lib/libcaprights.a),) LIBCAPRIGHTS=/usr/lib/libcaprights.a endif endif endif endif # Extra test programs for arch-transition tests EXTRA_PROGS = mini-me.32 mini-me.64 ifneq ($(wildcard /usr/include/gnu/stubs-x32.h),) EXTRA_PROGS += mini-me.x32 endif # Chain on to the master makefile include makefile ./libcaprights.a: $(LIBCAPRIGHTS_OBJS) ar cr $@ $^ # Small static programs of known architectures # These may require additional packages to be installed; for example, for Debian: # - libc6-dev-i386 provides 32-bit headers for a 64-bit system # - libc6-dev-x32 provides headers for the x32 ABI. mini-me.32: mini-me.c $(CC) $(CFLAGS) -m32 -static -o $@ $< mini-me.x32: mini-me.c $(CC) $(CFLAGS) -mx32 -static -o $@ $< mini-me.64: mini-me.c $(CC) $(CFLAGS) -m64 -static -o $@ $<
Upload File
Create Folder