1 Index: openswan-2.4.8/programs/loggerfix
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ openswan-2.4.8/programs/loggerfix 2007-06-04 13:22:50.209222320 +0200
7 +# use filename instead of /dev/null to log, but dont log to flash or ram
8 +# pref. log to nfs mount
9 +echo "$*" >> /dev/null
11 Index: openswan-2.4.8/programs/look/look.in
12 ===================================================================
13 --- openswan-2.4.8.orig/programs/look/look.in 2007-06-04 13:22:49.874273240 +0200
14 +++ openswan-2.4.8/programs/look/look.in 2007-06-04 13:22:50.209222320 +0200
17 pat="$pat|$defaultroutephys\$|$defaultroutevirt\$"
19 - for i in `echo "$IPSECinterfaces" | sed 's/=/ /'`
20 + for i in `echo "$IPSECinterfaces" | tr '=' ' '`
24 Index: openswan-2.4.8/programs/_plutorun/_plutorun.in
25 ===================================================================
26 --- openswan-2.4.8.orig/programs/_plutorun/_plutorun.in 2007-06-04 13:22:49.880272328 +0200
27 +++ openswan-2.4.8/programs/_plutorun/_plutorun.in 2007-06-04 13:22:50.209222320 +0200
32 - if test ! -w "`dirname $stderrlog`"
33 + if test ! -w "`echo $stderrlog | sed -r 's/(^.*\/)(.*$)/\1/'`"
35 echo Cannot write to directory to create \"$stderrlog\".
37 Index: openswan-2.4.8/programs/_realsetup/_realsetup.in
38 ===================================================================
39 --- openswan-2.4.8.orig/programs/_realsetup/_realsetup.in 2007-06-04 13:22:49.888271112 +0200
40 +++ openswan-2.4.8/programs/_realsetup/_realsetup.in 2007-06-04 13:22:50.210222168 +0200
43 # misc pre-Pluto setup
45 - perform test -d `dirname $subsyslock` "&&" touch $subsyslock
46 + perform test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock
48 if test " $IPSECforwardcontrol" = " yes"
50 Index: openswan-2.4.8/programs/send-pr/send-pr.in
51 ===================================================================
52 --- openswan-2.4.8.orig/programs/send-pr/send-pr.in 2007-06-04 13:22:49.894270200 +0200
53 +++ openswan-2.4.8/programs/send-pr/send-pr.in 2007-06-04 13:22:50.210222168 +0200
56 if [ "$fieldname" != "Category" ]
58 - values=`${BINDIR}/query-pr --valid-values $fieldname | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
59 + values=`${BINDIR}/query-pr --valid-values $fieldname | tr '\n' ' ' | sed 's/ *$//g;s/ / | /g;s/^/[ /;s/$/ ]/;'`
60 valslen=`echo "$values" | wc -c`
62 values="choose from a category listed above"
65 desc="<${values} (one line)>";
67 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
68 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
69 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
71 echo "${fmtname}${desc}" >> $file
75 desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>";
76 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
77 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
78 echo "s/^${dpat}//" >> $FIXFIL
80 echo "${fmtname}" >> $file;
84 desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>"
85 - dpat=`echo "$desc" | sed 's/[][*+^$|\()&/]/./g'`
86 + dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
87 echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
89 echo "${fmtname}${desc}" >> $file
90 Index: openswan-2.4.8/programs/setup/setup.in
91 ===================================================================
92 --- openswan-2.4.8.orig/programs/setup/setup.in 2007-06-04 13:22:49.902268984 +0200
93 +++ openswan-2.4.8/programs/setup/setup.in 2007-06-04 13:22:50.210222168 +0200
97 start|--start|stop|--stop|_autostop|_autostart)
98 - if test " `id -u`" != " 0"
99 + if [ "x${USER}" != "xroot" ]
101 echo "permission denied (must be superuser)" |
102 logger -s -p $IPSECsyslog -t ipsec_setup 2>&1
105 + # make sure all required directories exist
106 + if [ ! -d /var/run/pluto ]
108 + mkdir -p /var/run/pluto
110 + if [ ! -d /var/lock/subsys ]
112 + mkdir -p /var/lock/subsys
114 tmp=/var/run/pluto/ipsec_setup.st
115 outtmp=/var/run/pluto/ipsec_setup.out
117 Index: openswan-2.4.8/programs/showhostkey/showhostkey.in
118 ===================================================================
119 --- openswan-2.4.8.orig/programs/showhostkey/showhostkey.in 2007-06-04 13:22:49.908268072 +0200
120 +++ openswan-2.4.8/programs/showhostkey/showhostkey.in 2007-06-04 13:22:50.214221560 +0200
125 -host="`hostname --fqdn`"
126 +host="`cat /proc/sys/kernel/hostname`"
134 - suffix = ":" os "[rR][sS][aA]" os "{" os oc "$"
135 + suffix = ":" os "[rR][sS][aA]" os "[{]" os oc "$"
139 Index: openswan-2.4.8/programs/starter/klips.c
140 ===================================================================
141 --- openswan-2.4.8.orig/programs/starter/klips.c 2007-06-04 13:22:49.914267160 +0200
142 +++ openswan-2.4.8/programs/starter/klips.c 2007-06-04 13:22:50.214221560 +0200
144 if (stat(PROC_MODULES,&stb)==0) {
146 unsetenv("MODULECONF");
147 - system("depmod -a >/dev/null 2>&1 && modprobe ipsec");
148 + system("depmod -a >/dev/null 2>&1 && insmod ipsec");
150 if (stat(PROC_IPSECVERSION,&stb)==0) {
151 _klips_module_loaded = 1;
152 Index: openswan-2.4.8/programs/starter/netkey.c
153 ===================================================================
154 --- openswan-2.4.8.orig/programs/starter/netkey.c 2007-06-04 13:22:49.920266248 +0200
155 +++ openswan-2.4.8/programs/starter/netkey.c 2007-06-04 13:22:50.214221560 +0200
157 if (stat(PROC_MODULES,&stb)==0) {
159 unsetenv("MODULECONF");
160 - system("depmod -a >/dev/null 2>&1 && modprobe xfrm4_tunnel esp4 ah4 af_key");
161 + system("depmod -a >/dev/null 2>&1 && insmod xfrm4_tunnel esp4 ah4 af_key");
163 if (stat(PROC_NETKEY,&stb)==0) {
164 _netkey_module_loaded = 1;
165 Index: openswan-2.4.8/programs/_startklips/_startklips.in
166 ===================================================================
167 --- openswan-2.4.8.orig/programs/_startklips/_startklips.in 2007-06-04 13:22:49.928265032 +0200
168 +++ openswan-2.4.8/programs/_startklips/_startklips.in 2007-06-04 13:22:50.215221408 +0200
169 @@ -272,16 +272,16 @@
170 echo "FATAL ERROR: Both KLIPS and NETKEY IPsec code is present in kernel"
173 -if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn ipsec
174 +if test ! -f $ipsecversion && test ! -f $netkey
176 # statically compiled KLIPS/NETKEY not found; but there seems to be an ipsec module
177 - modprobe ipsec 2> /dev/null
178 + insmod -q ipsec 2> /dev/null
181 -if test ! -f $ipsecversion && test ! -f $netkey && modprobe -qn af_key
182 +if test ! -f $ipsecversion && test ! -f $netkey
184 # netkey should work then
185 - modprobe af_key 2> /dev/null
186 + insmod -q af_key 2> /dev/null
188 if test ! -f $ipsecversion && test ! -f $netkey
190 @@ -294,27 +294,27 @@
191 # modules shared between klips and netkey
194 - # we modprobe hw_random so ipsec verify can complain about not using it
195 - modprobe -q hw_random 2> /dev/null
196 + # we insmod hw_random so ipsec verify can complain about not using it
197 + insmod -q hw_random 2> /dev/null
198 # padlock must load before aes module
199 - modprobe -q padlock 2> /dev/null
200 + insmod -q padlock 2> /dev/null
201 # load the most common ciphers/algo's
202 - modprobe -q sha256 2> /dev/null
203 - modprobe -q sha1 2> /dev/null
204 - modprobe -q md5 2> /dev/null
205 - modprobe -q des 2> /dev/null
206 - modprobe -q aes 2> /dev/null
207 + insmod -q sha256 2> /dev/null
208 + insmod -q sha1 2> /dev/null
209 + insmod -q md5 2> /dev/null
210 + insmod -q des 2> /dev/null
211 + insmod -q aes 2> /dev/null
216 - modprobe -q ah4 2> /dev/null
217 - modprobe -q esp4 2> /dev/null
218 - modprobe -q ipcomp 2> /dev/null
219 + insmod -q ah4 2> /dev/null
220 + insmod -q esp4 2> /dev/null
221 + insmod -q ipcomp 2> /dev/null
222 # xfrm4_tunnel is needed by ipip and ipcomp
223 - modprobe -q xfrm4_tunnel 2> /dev/null
224 + insmod -q xfrm4_tunnel 2> /dev/null
225 # xfrm_user contains netlink support for IPsec
226 - modprobe -q xfrm_user 2> /dev/null
227 + insmod -q xfrm_user 2> /dev/null
230 if test ! -f $ipsecversion && $klips
233 unset MODPATH MODULECONF # no user overrides!
234 depmod -a >/dev/null 2>&1
237 if test ! -f $ipsecversion
239 echo "kernel appears to lack IPsec support (neither CONFIG_KLIPS or CONFIG_NET_KEY are set)"