aboutsummaryrefslogtreecommitdiffstats
path: root/pam_cap
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2019-12-02 20:48:13 -0800
committerAndrew G. Morgan <morgan@kernel.org>2019-12-05 21:14:47 -0800
commite9f55d90e482f680504487be6b3afb80865691d6 (patch)
treeb730e5720a0fe89bd12e4886a22b3d40a7e7640e /pam_cap
parentf9e5c9e91be200fced2c24a62bcc401344125d2a (diff)
downloadplatform_external_libcap-e9f55d90e482f680504487be6b3afb80865691d6.tar.gz
platform_external_libcap-e9f55d90e482f680504487be6b3afb80865691d6.tar.bz2
platform_external_libcap-e9f55d90e482f680504487be6b3afb80865691d6.zip
Implement a helper library for POSIX semantics syscalls.
Since Linux kernel supported threads are not POSIX threads and the glibc pthread library only supports POSIX semantics for 9 system calls, to fully support the POSIX semantics for a process sharing its security state across all of its threads, we've created libpsx. This commit also includes a threading test in tests/ for this new psx_syscall() abstraction - one that transparently mirrors calling POSIX-needing semantics syscalls over all running threads. Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'pam_cap')
-rw-r--r--pam_cap/Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/pam_cap/Makefile b/pam_cap/Makefile
index cc32fb6..22f0f81 100644
--- a/pam_cap/Makefile
+++ b/pam_cap/Makefile
@@ -3,12 +3,6 @@
topdir=$(shell pwd)/..
include ../Make.Rules
-# Note (as the author of much of the Linux-PAM library, I am confident
-# that this next line does *not* require -lpam on it.) If you think it
-# does, *verify that it does*, and if you observe that it fails as
-# written (and you know why it fails), email me and explain why. Thanks!
-LDLIBS += -L../libcap -lcap
-
all: pam_cap.so
$(MAKE) testcompile
@@ -16,14 +10,19 @@ install: all
mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)/security
install -m 0755 pam_cap.so $(FAKEROOT)$(LIBDIR)/security
+# Note (as the author of much of the Linux-PAM library, I am confident
+# that this next line does *not* require -lpam on it.) If you think it
+# does, *verify that it does*, and if you observe that it fails as
+# written (and you know why it fails), email me and explain why. Thanks!
+
pam_cap.so: pam_cap.o
- $(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
+ $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
pam_cap.o: pam_cap.c
$(CC) $(CFLAGS) $(IPATH) -c $< -o $@
testcompile: test.c pam_cap.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
+ $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
clean:
rm -f *.o *.so testcompile *~