aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2013-05-10 21:30:05 +0200
committerTimo Weingärtner <timo@tiwe.de>2013-05-12 18:44:18 +0200
commitce9367b3202477b3cc914cabfe0cb2a856f3a51d (patch)
tree8b95a97aa3a81149d38b704d7288d1dd9a63fc38 /Makefile
parent88dd2b1a22cd06fc401a8ddadd41114cebe159d5 (diff)
downloadlibpam-pwdfile-ce9367b3202477b3cc914cabfe0cb2a856f3a51d.tar.gz
major overhaul
* merge fgetpwnam into pam_sm_authenticate * handle empty password field * fix a fd and memory leak if pwdfile opening succeeds but locking fails * use crypt_r (enabled via USE_CRYPT_R) * rely on crypt() to handle newer crypt variants (including "good" md5 crypt) * make bigcrypt and broken md5 crypt optional * add some const's
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 2 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 06e1637..5b60784 100644
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,14 @@ PAM_LIB_DIR ?= $(DESTDIR)/lib/security
INSTALL ?= install
CFLAGS ?= -O2 -g -Wall -Wformat-security
+CPPFLAGS += -DUSE_CRYPT_R
CFLAGS += -fPIC -fvisibility=hidden
LDFLAGS += -Wl,-x -shared
TITLE = pam_pwdfile
LIBSHARED = $(TITLE).so
LDLIBS = -lcrypt -lpam
-LIBOBJ = $(TITLE).o md5_good.o md5_broken.o md5_crypt_good.o md5_crypt_broken.o bigcrypt.o
-CPPFLAGS_MD5_GOOD = -D'MD5Name(x)=Good\#\#x'
+LIBOBJ = $(TITLE).o md5_broken.o md5_crypt_broken.o bigcrypt.o
CPPFLAGS_MD5_BROKEN = -DHIGHFIRST -D'MD5Name(x)=Broken\#\#x'
@@ -19,15 +19,9 @@ $(LIBSHARED): $(LIBOBJ)
$(CC) $(LDFLAGS) $(LIBOBJ) $(LDLIBS) -o $@
-md5_good.o: md5.c
- $(CC) -c $(CPPFLAGS) $(CPPFLAGS_MD5_GOOD) $(CFLAGS) $< -o $@
-
md5_broken.o: md5.c
$(CC) -c $(CPPFLAGS) $(CPPFLAGS_MD5_BROKEN) $(CFLAGS) $< -o $@
-md5_crypt_good.o: md5_crypt.c
- $(CC) -c $(CPPFLAGS) $(CPPFLAGS_MD5_GOOD) $(CFLAGS) $< -o $@
-
md5_crypt_broken.o: md5_crypt.c
$(CC) -c $(CPPFLAGS) $(CPPFLAGS_MD5_BROKEN) $(CFLAGS) $< -o $@