Debian Codegraph @

contrib/sucap/Makefile

raw
1 topdir=$(shell pwd)/../..
2 include ../../Make.Rules
3
4 # This line is here to link against the in-tree copy of libcap.so
5 LINKEXTRA=-Wl,-rpath,$(topdir)/libcap
6 DEPS=../../libcap/libcap.so
7
8 all: su
9
10 su: su.c $(DEPS)
11 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DPAM_APP_NAME=\"sucap\" $< -o $@ $(LINKEXTRA) -lpam -lpam_misc $(LIBCAPLIB)
12 # to permit all ambient capabilities, this needs all permitted.
13 # sudo setcap =p ./su
14 # to permit all inheritable, as CAP_PURE1E needs, we don't need as much
15 sudo setcap cap_chown,cap_setgid,cap_setuid,cap_dac_read_search,cap_setpcap=p ./su
16
17 clean:
18 rm -f su su.o *~