aboutsummaryrefslogtreecommitdiffstats
path: root/meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-hardcoded-sysconfdir.patch
blob: 4758644bf47a7c5be37ffa252f2460a1c93cb1be (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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
From d71fb0712175b76304795bf90a125bc2b8d4c959 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Fri, 9 Jun 2017 08:55:36 +0800
Subject: [PATCH] racoon2: fix hardcoded sysconfdir

Replace the hardcoded path /etc/racoon2 with $sysconfdir

Upstream-Status: Inappropriate [configuration]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 pskgen/Makefile.in         |  2 +-
 pskgen/autogen.spmd.pwd.in |  8 ++++----
 samples/child-down.in      |  2 +-
 samples/child-rekey.in     |  2 +-
 samples/child-up.in        |  2 +-
 samples/ikesa-down.in      |  2 +-
 samples/ikesa-rekey.in     |  2 +-
 samples/ikesa-up.in        |  2 +-
 samples/migration.in       |  2 +-
 samples/ph1-down.in        |  2 +-
 samples/ph1-up.in          |  2 +-
 samples/racoon2.conf.in    | 18 +++++++++---------
 samples/vals.conf.in       | 22 +++++++++++-----------
 13 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/pskgen/Makefile.in b/pskgen/Makefile.in
index ff0d374..8d272df 100644
--- a/pskgen/Makefile.in
+++ b/pskgen/Makefile.in
@@ -20,7 +20,7 @@ install: all
 	$(INSTALL) -d $(DESTDIR)$(sbindir)
 	$(INSTALL_SCRIPT) $(PROG) $(DESTDIR)$(sbindir)
 	$(INSTALL_DATA) $(PROG).8 $(DESTDIR)$(mandir)/man8
-	$(INSTALL) -d $(DESTDIR)$(prefix)/etc/racoon2
+	$(INSTALL) -d $(DESTDIR)$(sysconfdir)
 	sh ./autogen.spmd.pwd
 
 depend:
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/child-down.in b/samples/child-down.in
index 01bae1f..8ac9061 100644
--- a/samples/child-down.in
+++ b/samples/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/child-rekey.in b/samples/child-rekey.in
index a10d673..63f3db7 100644
--- a/samples/child-rekey.in
+++ b/samples/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/child-up.in b/samples/child-up.in
index d3e8c65..0cacd04 100644
--- a/samples/child-up.in
+++ b/samples/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/ikesa-down.in b/samples/ikesa-down.in
index 5a12092..492d8a6 100644
--- a/samples/ikesa-down.in
+++ b/samples/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/ikesa-rekey.in b/samples/ikesa-rekey.in
index fd9668c..0f54c50 100644
--- a/samples/ikesa-rekey.in
+++ b/samples/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/ikesa-up.in b/samples/ikesa-up.in
index 2d72f96..5ab3d51 100644
--- a/samples/ikesa-up.in
+++ b/samples/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/migration.in b/samples/migration.in
index 0847eae..52f7980 100644
--- a/samples/migration.in
+++ b/samples/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/ph1-down.in b/samples/ph1-down.in
index 9d2e305..a7a8b0a 100644
--- a/samples/ph1-down.in
+++ b/samples/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/ph1-up.in b/samples/ph1-up.in
index ab205fa..75e8cab 100644
--- a/samples/ph1-up.in
+++ b/samples/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 5afda24..f365731 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
@@ -17,7 +17,7 @@ interface
 	spmd {
 		unix "/var/run/racoon2/spmif";
 	};
-	spmd_password "@prefix@/etc/racoon2/spmd.pwd";
+	spmd_password "@sysconfdir@/spmd.pwd";
 };
 
 # resolver info
@@ -42,7 +42,7 @@ resolver
 # Please don't touch this line (especially novice user);
 #
 
-include "@prefix@/etc/racoon2/default.conf";
+include "@sysconfdir@/default.conf";
 
 #
 # These are examples of configuration for each peer.
@@ -50,21 +50,21 @@ include "@prefix@/etc/racoon2/default.conf";
 # Uncomment following one 'include' line you want to use.
 
 ## Transport mode IKEv2 or IKEv1
-# include "@prefix@/etc/racoon2/transport_ike.conf";
+# include "@sysconfdir@/transport_ike.conf";
 
 ## Tunnel mode IKEv2 or IKEv1 (initiator and responder)
-# include "@prefix@/etc/racoon2/tunnel_ike.conf";
+# include "@sysconfdir@/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@/tunnel_ike_natt.conf";
 
 ## Transport mode KINK
-# include "@prefix@/etc/racoon2/transport_kink.conf";
+# include "@sysconfdir@/transport_kink.conf";
 
 ## Tunnel mode KINK
-# include "@prefix@/etc/racoon2/tunnel_kink.conf";
+# include "@sysconfdir@/tunnel_kink.conf";
 
 ## For local test
-# include "@prefix@/etc/racoon2/local-test.conf";
+# include "@sysconfdir@/local-test.conf";
diff --git a/samples/vals.conf.in b/samples/vals.conf.in
index a0e8023..2fa7e4d 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
@@ -75,16 +75,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
-- 
1.9.1