aboutsummaryrefslogtreecommitdiffstats
path: root/meta-cgl-common/recipes-cgl/racoon2/racoon2/0013-racoon2-fix-hardcoded-sysconfdir.patch
blob: b3fd55be3bbff489fe8aaee1b626aedff60b3e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
From 4d6a8645bf2c4041afeb1c1a4d0cf340fe5c7d6f Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Wed, 18 Mar 2020 19:54:51 +0000
Subject: [PATCH 13/13] racoon2-fix-hardcoded-sysconfdir

---
 pskgen/autogen.spmd.pwd.in  |  8 ++++----
 samples/hook/child-down.in  |  2 +-
 samples/hook/child-rekey.in |  2 +-
 samples/hook/child-up.in    |  2 +-
 samples/hook/ikesa-down.in  |  2 +-
 samples/hook/ikesa-rekey.in |  2 +-
 samples/hook/ikesa-up.in    |  2 +-
 samples/hook/migration.in   |  2 +-
 samples/hook/ph1-down.in    |  2 +-
 samples/hook/ph1-up.in      |  2 +-
 samples/racoon2.conf.in     | 18 +++++++++---------
 samples/vals.conf.in        | 22 +++++++++++-----------
 12 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/pskgen/autogen.spmd.pwd.in b/pskgen/autogen.spmd.pwd.in
index ac6560c..a9981f3 100755
--- a/pskgen/autogen.spmd.pwd.in
+++ b/pskgen/autogen.spmd.pwd.in
@@ -1,11 +1,11 @@
 #!/bin/sh
 
-if [ -f @prefix@/etc/racoon2/spmd.pwd ]
+if [ -f @sysconfdir@/spmd.pwd ]
 then
-	mv @prefix@/etc/racoon2/spmd.pwd @prefix@/etc/racoon2/spmd.pwd.bak
+	mv @sysconfdir@/spmd.pwd @sysconfdir@/spmd.pwd.bak
 fi
 
-if [ -x @prefix@/sbin/pskgen ]
+if [ -x @sbindir@/pskgen ]
 then
-	@prefix@/sbin/pskgen -r -o @prefix@/etc/racoon2/spmd.pwd
+	@sbindir@/pskgen -r -o @sysconfdir@/spmd.pwd
 fi
diff --git a/samples/hook/child-down.in b/samples/hook/child-down.in
index 01bae1f..8ac9061 100644
--- a/samples/hook/child-down.in
+++ b/samples/hook/child-down.in
@@ -3,7 +3,7 @@
 # run scripts in the child-down.d directory when CHILD_SA is removed
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/child-rekey.in b/samples/hook/child-rekey.in
index a10d673..63f3db7 100644
--- a/samples/hook/child-rekey.in
+++ b/samples/hook/child-rekey.in
@@ -3,7 +3,7 @@
 # run scripts in the child-rekey.d directory when CHILD_SA is rekeyed
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/child-up.in b/samples/hook/child-up.in
index d3e8c65..0cacd04 100644
--- a/samples/hook/child-up.in
+++ b/samples/hook/child-up.in
@@ -3,7 +3,7 @@
 # run scripts in the child-up.d directory when CHILD_SA is established
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/ikesa-down.in b/samples/hook/ikesa-down.in
index 5a12092..492d8a6 100644
--- a/samples/hook/ikesa-down.in
+++ b/samples/hook/ikesa-down.in
@@ -3,7 +3,7 @@
 # run scripts in the ikesa-down.d directory when IKE_SA is removed
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/ikesa-rekey.in b/samples/hook/ikesa-rekey.in
index fd9668c..0f54c50 100644
--- a/samples/hook/ikesa-rekey.in
+++ b/samples/hook/ikesa-rekey.in
@@ -3,7 +3,7 @@
 # run scripts in the ikesa-rekey.d directory when IKE_SA is rekeyed 
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/ikesa-up.in b/samples/hook/ikesa-up.in
index 2d72f96..5ab3d51 100644
--- a/samples/hook/ikesa-up.in
+++ b/samples/hook/ikesa-up.in
@@ -3,7 +3,7 @@
 # run scripts in the ikesa-up.d directory when IKE_SA is established
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/migration.in b/samples/hook/migration.in
index 0847eae..52f7980 100644
--- a/samples/hook/migration.in
+++ b/samples/hook/migration.in
@@ -3,7 +3,7 @@
 # run scripts in the migration.d directory when MIP6 MIGRATE is issued
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/ph1-down.in b/samples/hook/ph1-down.in
index 9d2e305..a7a8b0a 100644
--- a/samples/hook/ph1-down.in
+++ b/samples/hook/ph1-down.in
@@ -3,7 +3,7 @@
 # run scripts in the ph1-down.d directory when ISAKMP SA is removed
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/hook/ph1-up.in b/samples/hook/ph1-up.in
index ab205fa..75e8cab 100644
--- a/samples/hook/ph1-up.in
+++ b/samples/hook/ph1-up.in
@@ -3,7 +3,7 @@
 # run scripts in the ph1-up.d directory when ISAKMP SA is established
 #
 
-cd @prefix@/etc/racoon2/hook
+cd @sysconfdir@/hook
 
 . ./functions
 
diff --git a/samples/racoon2.conf.in b/samples/racoon2.conf.in
index 9dc9d5a..5fb6560 100644
--- a/samples/racoon2.conf.in
+++ b/samples/racoon2.conf.in
@@ -1,7 +1,7 @@
 # $Id: racoon2.conf.in,v 1.34 2007/12/27 01:08:52 mk Exp $
 
 ## Edit vals.conf for your environment
-include "@prefix@/etc/racoon2/vals.conf";
+include "@sysconfdir@/vals.conf";
 
 # interface info
 interface
@@ -21,7 +21,7 @@ interface
 	spmd {
 		unix "/var/run/racoon2/spmif";
 	};
-	spmd_password "@prefix@/etc/racoon2/spmd.pwd";
+	spmd_password "@sysconfdir@/spmd.pwd";
 };
 
 # resolver info
@@ -46,7 +46,7 @@ resolver
 # Please don't touch this line (especially novice user);
 #
 
-include "@prefix@/etc/racoon2/default.conf";
+include "@sysconfdir@/default.conf";
 
 # Define host specific pre-shared keys here
 #
@@ -82,21 +82,21 @@ remote 192.168.2.67 {
 ## uncommenting this 'include' line, also uncomment the
 ## 'include' line for transport_ike_natt.conf in the transport_ike.conf
 ## file and edit that file and vals.conf appropriately for your environment
-# include "@prefix@/etc/racoon2/transport_ike.conf";
+# include "@sysconfdir@/racoon2/transport_ike.conf";
 
 ## Tunnel mode IKEv2 or IKEv1 (initiator and responder)
-# include "@prefix@/etc/racoon2/tunnel_ike.conf";
+# include "@sysconfdir@/racoon2/tunnel_ike.conf";
 
 ## Tunnel mode IKEv2 (responder; NAT-T support)
 ## Enable this if you're a responder in global net and
 ## the peer is an initiator behind NAT.
-# include "@prefix@/etc/racoon2/tunnel_ike_natt.conf";
+# include "@sysconfdir@/racoon2/tunnel_ike_natt.conf";
 
 ## Transport mode KINK
-# include "@prefix@/etc/racoon2/transport_kink.conf";
+# include "@sysconfdir@/racoon2/transport_kink.conf";
 
 ## Tunnel mode KINK
-# include "@prefix@/etc/racoon2/tunnel_kink.conf";
+# include "@sysconfdir@/racoon2/tunnel_kink.conf";
 
 ## For local test
-# include "@prefix@/etc/racoon2/local-test.conf";
+# include "@sysconfdir@/racoon2/local-test.conf";
diff --git a/samples/vals.conf.in b/samples/vals.conf.in
index 442786c..b378513 100644
--- a/samples/vals.conf.in
+++ b/samples/vals.conf.in
@@ -2,10 +2,10 @@
 setval {
 ### Directory Settings ###
 	# Preshared key file directory : specify if you want to use preshared keys
-	PSKDIR		"@prefix@/etc/racoon2/psk";
+	PSKDIR		"@sysconfdir@/psk";
 
 	# Cert file directory : specify if you want to use certs
-	CERTDIR		"@prefix@/etc/racoon2/cert";
+	CERTDIR		"@sysconfdir@/cert";
 
 ### ID Settings ###
 	# your FQDN : specify if you want to use FQDN as your ID
@@ -103,16 +103,16 @@ setval {
 
 ### Scripts
         ## IKEv2
-	IKESAUP_SCR	"@prefix@/etc/racoon2/hook/ikesa-up";
-	IKESADOWN_SCR	"@prefix@/etc/racoon2/hook/ikesa-down";
-	CHILDUP_SCR	"@prefix@/etc/racoon2/hook/child-up";
-	CHILDOWN_SCR	"@prefix@/etc/racoon2/hook/child-down";
-	IKESAREKEY_SCR	"@prefix@/etc/racoon2/hook/ikesa-rekey";
-	CHILDREKEY_SCR	"@prefix@/etc/racoon2/hook/child-rekey";
-	MIGRATION_SCR	"@prefix@/etc/racoon2/hook/migration";
+	IKESAUP_SCR	"@sysconfdir@/hook/ikesa-up";
+	IKESADOWN_SCR	"@sysconfdir@/hook/ikesa-down";
+	CHILDUP_SCR	"@sysconfdir@/hook/child-up";
+	CHILDOWN_SCR	"@sysconfdir@/hook/child-down";
+	IKESAREKEY_SCR	"@sysconfdir@/hook/ikesa-rekey";
+	CHILDREKEY_SCR	"@sysconfdir@/hook/child-rekey";
+	MIGRATION_SCR	"@sysconfdir@/hook/migration";
 	## IKEv1
-	PH1UP_SCR	"@prefix@/etc/racoon2/hook/ph1-up";
-	PH1DOWN_SCR	"@prefix@/etc/racoon2/hook/ph1-down";
+	PH1UP_SCR	"@sysconfdir@/hook/ph1-up";
+	PH1DOWN_SCR	"@sysconfdir@/hook/ph1-down";
 
 ### KINK ###
 	# Kerberos5 principal
-- 
2.24.1