]> git.pld-linux.org Git - packages/cracklib.git/blame - cracklib.patch
- added using CVS keywords in %changelog (for automating them).
[packages/cracklib.git] / cracklib.patch
CommitLineData
d141c316
AF
1--- cracklib,2.7/cracklib/fascist.c.rh Wed Dec 31 05:26:46 1997
2+++ cracklib,2.7/cracklib/fascist.c Tue Mar 10 18:17:43 1998
3@@ -11,6 +11,7 @@
4 #include "packer.h"
5 #include <sys/types.h>
6 #include <pwd.h>
7+#include <string.h>
8
9 #define ISSKIP(x) (isspace(x) || ispunct(x))
10
11@@ -659,7 +660,7 @@
12 return ("it does not contain enough DIFFERENT characters");
13 }
14
15- strcpy(password, Lowercase(password));
16+ strcpy(password, (char *)Lowercase(password));
17
18 Trim(password);
19
20@@ -722,7 +723,7 @@
21 }
22 }
23
24- strcpy(password, Reverse(password));
25+ strcpy(password, (char *)Reverse(password));
26
27 for (i = 0; r_destructors[i]; i++)
28 {
29--- cracklib,2.7/cracklib/Makefile.rh Sun Dec 14 17:49:21 1997
30+++ cracklib,2.7/cracklib/Makefile Tue Mar 10 18:54:11 1998
31@@ -6,13 +6,21 @@
32 # and upwards.
33 ###
34
35-LIB= libcrack.a
36-OBJ= fascist.o packlib.o rules.o stringlib.o
37-CFLAGS= -O -I../cracklib -DIN_CRACKLIB
38+LIB = libcrack.so
39+OBJ = fascist.o packlib.o rules.o stringlib.o
40+CFLAGS = $(RPM_OPT_FLAGS) -g -I../cracklib -DIN_CRACKLIB -fPIC
41+LD = ld
42
43-$(LIB): $(OBJ)
44- ar rv $(LIB) $?
45- -ranlib $(LIB)
46+$(LIB): $(OBJ) Makefile
47+ $(LD) -shared -soname $(LIB).$(MAJOR) -o $(LIB).$(VERSION) $(OBJ) -lc
48+ rm -f $(LIB).$(MAJOR) $(LIB)
49+ ln -s $(LIB).$(VERSION) $(LIB).$(MAJOR)
50+ ln -s $(LIB).$(MAJOR) $(LIB)
51
52 clean:
53- -rm -f $(OBJ) $(LIB) *~
54+ -rm -f $(OBJ) $(LIB) $(LIB).$(VERSION) *~
55+
56+install: $(LIB) crack.h
57+ install -m 755 $(LIB).$(VERSION) $(ROOT)/usr/lib
58+ ln -sf $(LIB).$(VERSION) $(ROOT)/usr/lib/$(LIB)
59+ install -m 644 crack.h $(ROOT)/usr/include
60--- cracklib,2.7/cracklib/crack.h.rh Tue Mar 10 18:17:43 1998
61+++ cracklib,2.7/cracklib/crack.h Tue Mar 10 18:17:43 1998
62@@ -0,0 +1,15 @@
63+
64+#ifndef CRACKLIB_H
65+#define CRACKLIB_H
66+
67+/* Pass this function a password (pw) and a path to the
68+ * dictionaries (/usr/lib/cracklib_dict should be specified)
69+ * and it will either return a NULL string, meaning that the
70+ * password is good, or a pointer to a string that explains the
71+ * problem with the password.
72+ * You must link with -lcrack
73+ */
74+
75+extern char *FascistCheck(char *pw, char *dictpath);
76+
77+#endif
78--- cracklib,2.7/util/Makefile.rh Sun Dec 14 17:49:34 1997
79+++ cracklib,2.7/util/Makefile Tue Mar 10 18:17:43 1998
80@@ -14,27 +14,31 @@
81 #SunOS users (and others?) should consider static linking of their passwd binary
82 #CFLAGS= -O -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"' -Bstatic
83
84-CFLAGS= -O -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"'
85-LIBS= ../cracklib/libcrack.a
86+CFLAGS = $(RPM_OPT_FLAGS) -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"'
87+LDFLAGS = -L../cracklib -lcrack
88+LIBS = ../cracklib/libcrack.so
89
90 all: packer unpacker testnum teststr testlib
91 touch all
92
93 packer: packer.o $(LIBS)
94- cc $(CFLAGS) -o $@ $@.o $(LIBS)
95+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
96
97 unpacker: unpacker.o $(LIBS)
98- cc $(CFLAGS) -o $@ $@.o $(LIBS)
99+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
100
101 testnum: testnum.o $(LIBS)
102- cc $(CFLAGS) -o $@ $@.o $(LIBS)
103+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
104
105 teststr: teststr.o $(LIBS)
106- cc $(CFLAGS) -o $@ $@.o $(LIBS)
107+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
108
109 testlib: testlib.o $(LIBS)
110- cc $(CFLAGS) -o $@ $@.o $(LIBS)
111+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
112
113 clean:
114 -rm *.o *~ all
115 -rm teststr testnum testlib packer unpacker
116+
117+install: all create-cracklib-dict
118+ install -m 755 mkdict packer create-cracklib-dict $(ROOT)/usr/sbin
119--- cracklib,2.7/util/create-cracklib-dict.rh Tue Mar 10 18:17:43 1998
120+++ cracklib,2.7/util/create-cracklib-dict Tue Mar 10 18:17:43 1998
121@@ -0,0 +1,15 @@
122+#!/bin/sh
123+if [ -z "$*" ]; then
124+ echo "Usage:"
125+ echo " /usr/sbin/create-cracklib-dict wordlist ..."
126+ echo
127+ echo "This script takes one or more word list files as arguments"
128+ echo "and converts them into cracklib dictionaries for use"
129+ echo "by password checking programs. The results are placed in"
130+ echo "/usr/lib/cracklib_dict.*"
131+ echo
132+ echo "Example:"
133+ echo "/usr/sbin/create-cracklib-dict /usr/dict/words"
134+else
135+ /usr/sbin/mkdict $* | /usr/sbin/packer /usr/lib/cracklib_dict
136+fi
137--- cracklib,2.7/Makefile.rh Wed Dec 31 05:33:53 1997
138+++ cracklib,2.7/Makefile Tue Mar 10 18:52:47 1998
139@@ -7,14 +7,21 @@
140 ###
141
142 ###
143+# cracklib version
144+MAJOR=2
145+MINOR=7
146+VERSION=$(MAJOR).$(MINOR)
147+export MAJOR MINOR VERSION
148+
149+###
150 # set this to the absolute path (less extn) of compressed dict.
151
152-DICTPATH="/usr/local/lib/pw_dict"
153+DICTPATH="/usr/lib/cracklib_dict"
154
155 ###
156 # Set this to the path of one or more files continaing wordlists.
157
158-SRCDICTS=/usr/dict/words
159+SRCDICTS=/usr/dict/words /usr/dict/extra.words
160
161 ###
162 # If you have installed the cracklib-dicts directory, use this
163@@ -36,7 +43,9 @@
164 -rm -f all installed Part* *.BAK *.bak *~
165
166 install: all
167+ ( cd cracklib && make install && exit $$? )
168+ ( cd util && make install && exit $$? )
169 @echo 'if "sort" dies from lack of space, see "util/mkdict"'
170- util/mkdict $(SRCDICTS) | util/packer $(DICTPATH)
171+ util/mkdict $(SRCDICTS) | LD_LIBRARY_PATH=cracklib util/packer $(ROOT)$(DICTPATH)
172 touch installed
173 ### @echo 'now go install passwd/passwd where you want it'
This page took 0.100569 seconds and 4 git commands to generate.