2022-06-09 00:46:52 +00:00
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index 4457bad..91de40b 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -13,17 +13,10 @@ CRACKLIB=/usr/share/cracklib/pw_dict
|
2020-10-15 20:20:47 +00:00
|
|
|
#
|
|
|
|
CONFIG=/etc/openldap/check_password.conf
|
|
|
|
|
2022-06-09 00:46:52 +00:00
|
|
|
-
|
2020-10-15 20:20:47 +00:00
|
|
|
-# Where to find the OpenLDAP headers.
|
|
|
|
-#
|
2022-06-09 00:46:52 +00:00
|
|
|
-LDAP_INC=-I/usr/include/openldap/include \
|
|
|
|
- -I/usr/include/openldap/servers/slapd
|
2020-10-15 20:20:47 +00:00
|
|
|
-
|
|
|
|
-# Where to find the CrackLib headers.
|
|
|
|
-#
|
|
|
|
-CRACK_INC=
|
|
|
|
-
|
|
|
|
-INCS=$(LDAP_INC) $(CRACK_INC)
|
2022-06-09 00:46:52 +00:00
|
|
|
+CFLAGS+=-fpic \
|
|
|
|
+ -DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \
|
|
|
|
+ -DCONFIG_FILE="\"$(CONFIG)\"" \
|
|
|
|
+ -DDEBUG
|
|
|
|
|
2020-10-15 20:20:47 +00:00
|
|
|
LDAP_LIB=-lldap_r -llber
|
|
|
|
|
2022-06-09 00:46:52 +00:00
|
|
|
@@ -33,27 +26,21 @@ LDAP_LIB=-lldap_r -llber
|
|
|
|
#
|
|
|
|
CRACKLIB_LIB=-lcrack
|
|
|
|
|
|
|
|
-CC_FLAGS=-g -O2 -Wall -fpic
|
|
|
|
-CRACKLIB_OPT=-DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\""
|
|
|
|
-DEBUG_OPT=-DDEBUG
|
|
|
|
-CONFIG_OPT=-DCONFIG_FILE="\"$(CONFIG)\""
|
|
|
|
-
|
|
|
|
-OPT=$(CC_FLAGS) $(CRACKLIB_OPT) $(CONFIG_OPT) $(DEBUG_OPT)
|
|
|
|
-
|
|
|
|
LIBS=$(LDAP_LIB) $(CRACKLIB_LIB)
|
|
|
|
|
|
|
|
LIBDIR=/usr/lib/openldap/
|
|
|
|
|
|
|
|
+
|
2020-10-15 20:20:47 +00:00
|
|
|
all: check_password
|
|
|
|
|
|
|
|
check_password.o:
|
|
|
|
- $(CC) $(OPT) -c $(INCS) check_password.c
|
|
|
|
+ $(CC) $(CFLAGS) -c $(LDAP_INC) check_password.c
|
|
|
|
|
|
|
|
check_password: clean check_password.o
|
|
|
|
- $(CC) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
|
|
|
|
+ $(CC) $(LDFLAGS) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
|
|
|
|
|
|
|
|
install: check_password
|
2022-06-09 00:46:52 +00:00
|
|
|
- cp -f check_password.so $(LIBDIR)
|
|
|
|
+ cp -f check_password.so ../../../usr/lib/openldap/modules/
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) check_password.o check_password.so check_password.lo
|