1 |
commit: b778992fd2906b1a0cb5370433afda074de55301 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 24 14:49:34 2017 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 24 14:50:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b778992f |
7 |
|
8 |
net-irc/shadowircd: new EAPI=6 revision to fix two bugs. |
9 |
|
10 |
This new revision updates the EAPI, adds a patch for fix some |
11 |
format-security warnings, and comes with a simplified init script. The |
12 |
latter two fixes address two open bugs, and the new EAPI lets us drop |
13 |
the eutils and multilib eclasses. |
14 |
|
15 |
Gentoo-Bug: 520620 |
16 |
Gentoo-Bug: 603806 |
17 |
|
18 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
19 |
|
20 |
net-irc/shadowircd/files/format-security.patch | 384 +++++++++++++++++++++++++ |
21 |
net-irc/shadowircd/files/shadowircd.initd-r1 | 26 ++ |
22 |
net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild | 95 ++++++ |
23 |
3 files changed, 505 insertions(+) |
24 |
|
25 |
diff --git a/net-irc/shadowircd/files/format-security.patch b/net-irc/shadowircd/files/format-security.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..bd6e26e28a5 |
28 |
--- /dev/null |
29 |
+++ b/net-irc/shadowircd/files/format-security.patch |
30 |
@@ -0,0 +1,384 @@ |
31 |
+From 6055fe3ee3b7b932e2a21160251fff0f0c6bcc39 Mon Sep 17 00:00:00 2001 |
32 |
+From: Michael Orlitzky <michael@××××××××.com> |
33 |
+Date: Mon, 24 Jul 2017 10:39:43 -0400 |
34 |
+Subject: [PATCH 1/1] Supply trivial format strings to fix format-security |
35 |
+ warnings. |
36 |
+ |
37 |
+This commit adds a trivial format string "%s" to a number of function |
38 |
+calls that are otherwise missing them. This avoids GCC's |
39 |
+format-security warnings, which cause compilation failures with |
40 |
+-Werror=format-security. |
41 |
+ |
42 |
+Gentoo-Bug: 520620 |
43 |
+--- |
44 |
+ bandb/bandb.c | 2 +- |
45 |
+ modules/core/m_kill.c | 4 ++-- |
46 |
+ modules/m_away.c | 4 ++-- |
47 |
+ modules/m_challenge.c | 8 ++++---- |
48 |
+ modules/m_info.c | 6 +++--- |
49 |
+ modules/m_map.c | 4 ++-- |
50 |
+ modules/m_oper.c | 6 +++--- |
51 |
+ modules/m_stats.c | 22 +++++++++++----------- |
52 |
+ src/chmode.c | 4 ++-- |
53 |
+ src/parse.c | 2 +- |
54 |
+ src/s_auth.c | 2 +- |
55 |
+ src/sslproc.c | 8 ++++---- |
56 |
+ 12 files changed, 36 insertions(+), 36 deletions(-) |
57 |
+ |
58 |
+diff --git a/bandb/bandb.c b/bandb/bandb.c |
59 |
+index 33166b1..2d272a1 100644 |
60 |
+--- a/bandb/bandb.c |
61 |
++++ b/bandb/bandb.c |
62 |
+@@ -289,7 +289,7 @@ db_error_cb(const char *errstr) |
63 |
+ { |
64 |
+ char buf[256]; |
65 |
+ rb_snprintf(buf, sizeof(buf), "! :%s", errstr); |
66 |
+- rb_helper_write(bandb_helper, buf); |
67 |
++ rb_helper_write(bandb_helper, "%s", buf); |
68 |
+ rb_sleep(2 << 30, 0); |
69 |
+ exit(1); |
70 |
+ } |
71 |
+diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c |
72 |
+index 80df7df..2fa91da 100644 |
73 |
+--- a/modules/core/m_kill.c |
74 |
++++ b/modules/core/m_kill.c |
75 |
+@@ -97,7 +97,7 @@ mo_kill(struct Client *client_p, struct Client *source_p, int parc, const char * |
76 |
+ if((target_p = get_history(user, (long) KILLCHASETIMELIMIT)) == NULL) |
77 |
+ { |
78 |
+ if (strchr(user, '.')) |
79 |
+- sendto_one_numeric(source_p, ERR_CANTKILLSERVER, form_str(ERR_CANTKILLSERVER)); |
80 |
++ sendto_one_numeric(source_p, ERR_CANTKILLSERVER, "%s", form_str(ERR_CANTKILLSERVER)); |
81 |
+ else |
82 |
+ sendto_one_numeric(source_p, ERR_NOSUCHNICK, |
83 |
+ form_str(ERR_NOSUCHNICK), user); |
84 |
+@@ -216,7 +216,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char * |
85 |
+ |
86 |
+ if(IsServer(target_p) || IsMe(target_p)) |
87 |
+ { |
88 |
+- sendto_one_numeric(source_p, ERR_CANTKILLSERVER, form_str(ERR_CANTKILLSERVER)); |
89 |
++ sendto_one_numeric(source_p, ERR_CANTKILLSERVER, "%s", form_str(ERR_CANTKILLSERVER)); |
90 |
+ return 0; |
91 |
+ } |
92 |
+ |
93 |
+diff --git a/modules/m_away.c b/modules/m_away.c |
94 |
+index 557371e..13c4c39 100644 |
95 |
+--- a/modules/m_away.c |
96 |
++++ b/modules/m_away.c |
97 |
+@@ -85,7 +85,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p |
98 |
+ free_away(source_p); |
99 |
+ } |
100 |
+ if(MyConnect(source_p)) |
101 |
+- sendto_one_numeric(source_p, RPL_UNAWAY, form_str(RPL_UNAWAY)); |
102 |
++ sendto_one_numeric(source_p, RPL_UNAWAY, "%s", form_str(RPL_UNAWAY)); |
103 |
+ return 0; |
104 |
+ } |
105 |
+ |
106 |
+@@ -99,7 +99,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p |
107 |
+ } |
108 |
+ |
109 |
+ if(MyConnect(source_p)) |
110 |
+- sendto_one_numeric(source_p, RPL_NOWAWAY, form_str(RPL_NOWAWAY)); |
111 |
++ sendto_one_numeric(source_p, RPL_NOWAWAY, "%s", form_str(RPL_NOWAWAY)); |
112 |
+ |
113 |
+ return 0; |
114 |
+ } |
115 |
+diff --git a/modules/m_challenge.c b/modules/m_challenge.c |
116 |
+index 2066095..b8514c4 100644 |
117 |
+--- a/modules/m_challenge.c |
118 |
++++ b/modules/m_challenge.c |
119 |
+@@ -172,7 +172,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch |
120 |
+ |
121 |
+ if(oper_p == NULL) |
122 |
+ { |
123 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
124 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
125 |
+ ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", |
126 |
+ source_p->localClient->opername, source_p->name, |
127 |
+ source_p->username, source_p->host, |
128 |
+@@ -203,7 +203,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch |
129 |
+ |
130 |
+ if(oper_p == NULL) |
131 |
+ { |
132 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
133 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
134 |
+ ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", |
135 |
+ parv[1], source_p->name, |
136 |
+ source_p->username, source_p->host, source_p->sockhost); |
137 |
+@@ -223,7 +223,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch |
138 |
+ |
139 |
+ if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p)) |
140 |
+ { |
141 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
142 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
143 |
+ ilog(L_FOPER, "FAILED CHALLENGE (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS", |
144 |
+ parv[1], source_p->name, source_p->username, source_p->host, |
145 |
+ source_p->sockhost); |
146 |
+@@ -241,7 +241,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch |
147 |
+ { |
148 |
+ if (source_p->certfp == NULL || strcasecmp(source_p->certfp, oper_p->certfp)) |
149 |
+ { |
150 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
151 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
152 |
+ ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- client certificate fingerprint mismatch", |
153 |
+ parv[1], source_p->name, |
154 |
+ source_p->username, source_p->host, source_p->sockhost); |
155 |
+diff --git a/modules/m_info.c b/modules/m_info.c |
156 |
+index dd14294..bab156f 100644 |
157 |
+--- a/modules/m_info.c |
158 |
++++ b/modules/m_info.c |
159 |
+@@ -722,7 +722,7 @@ m_info(struct Client *client_p, struct Client *source_p, int parc, const char *p |
160 |
+ /* safe enough to give this on a local connect only */ |
161 |
+ sendto_one(source_p, form_str(RPL_LOAD2HI), |
162 |
+ me.name, source_p->name, "INFO"); |
163 |
+- sendto_one_numeric(source_p, RPL_ENDOFINFO, form_str(RPL_ENDOFINFO)); |
164 |
++ sendto_one_numeric(source_p, RPL_ENDOFINFO, "%s", form_str(RPL_ENDOFINFO)); |
165 |
+ return 0; |
166 |
+ } |
167 |
+ else |
168 |
+@@ -736,7 +736,7 @@ m_info(struct Client *client_p, struct Client *source_p, int parc, const char *p |
169 |
+ send_info_text(source_p); |
170 |
+ send_birthdate_online_time(source_p); |
171 |
+ |
172 |
+- sendto_one_numeric(source_p, RPL_ENDOFINFO, form_str(RPL_ENDOFINFO)); |
173 |
++ sendto_one_numeric(source_p, RPL_ENDOFINFO, "%s", form_str(RPL_ENDOFINFO)); |
174 |
+ return 0; |
175 |
+ } |
176 |
+ |
177 |
+@@ -761,7 +761,7 @@ mo_info(struct Client *client_p, struct Client *source_p, int parc, const char * |
178 |
+ |
179 |
+ send_birthdate_online_time(source_p); |
180 |
+ |
181 |
+- sendto_one_numeric(source_p, RPL_ENDOFINFO, form_str(RPL_ENDOFINFO)); |
182 |
++ sendto_one_numeric(source_p, RPL_ENDOFINFO, "%s", form_str(RPL_ENDOFINFO)); |
183 |
+ } |
184 |
+ |
185 |
+ return 0; |
186 |
+diff --git a/modules/m_map.c b/modules/m_map.c |
187 |
+index 7a45140..baadc86 100644 |
188 |
+--- a/modules/m_map.c |
189 |
++++ b/modules/m_map.c |
190 |
+@@ -59,7 +59,7 @@ m_map(struct Client *client_p, struct Client *source_p, int parc, const char *pa |
191 |
+ } |
192 |
+ |
193 |
+ dump_map(client_p, &me, buf); |
194 |
+- sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND)); |
195 |
++ sendto_one_numeric(client_p, RPL_MAPEND, "%s", form_str(RPL_MAPEND)); |
196 |
+ return 0; |
197 |
+ } |
198 |
+ |
199 |
+@@ -71,7 +71,7 @@ mo_map(struct Client *client_p, struct Client *source_p, int parc, const char *p |
200 |
+ { |
201 |
+ dump_map(client_p, &me, buf); |
202 |
+ scache_send_missing(client_p); |
203 |
+- sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND)); |
204 |
++ sendto_one_numeric(client_p, RPL_MAPEND, "%s", form_str(RPL_MAPEND)); |
205 |
+ |
206 |
+ return 0; |
207 |
+ } |
208 |
+diff --git a/modules/m_oper.c b/modules/m_oper.c |
209 |
+index b403b28..af1e008 100644 |
210 |
+--- a/modules/m_oper.c |
211 |
++++ b/modules/m_oper.c |
212 |
+@@ -83,7 +83,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p |
213 |
+ |
214 |
+ if(oper_p == NULL) |
215 |
+ { |
216 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
217 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
218 |
+ ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", |
219 |
+ name, source_p->name, |
220 |
+ source_p->username, source_p->host, source_p->sockhost); |
221 |
+@@ -100,7 +100,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p |
222 |
+ |
223 |
+ if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p)) |
224 |
+ { |
225 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
226 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
227 |
+ ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS", |
228 |
+ name, source_p->name, |
229 |
+ source_p->username, source_p->host, source_p->sockhost); |
230 |
+@@ -118,7 +118,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p |
231 |
+ { |
232 |
+ if (source_p->certfp == NULL || strcasecmp(source_p->certfp, oper_p->certfp)) |
233 |
+ { |
234 |
+- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); |
235 |
++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); |
236 |
+ ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- client certificate fingerprint mismatch", |
237 |
+ name, source_p->name, |
238 |
+ source_p->username, source_p->host, source_p->sockhost); |
239 |
+diff --git a/modules/m_stats.c b/modules/m_stats.c |
240 |
+index dc826bc..51555b4 100644 |
241 |
+--- a/modules/m_stats.c |
242 |
++++ b/modules/m_stats.c |
243 |
+@@ -223,7 +223,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char * |
244 |
+ if(stats_cmd_table[i].need_oper && !IsOper(source_p)) |
245 |
+ { |
246 |
+ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
247 |
+- form_str (ERR_NOPRIVILEGES)); |
248 |
++ "%s", form_str (ERR_NOPRIVILEGES)); |
249 |
+ break; |
250 |
+ } |
251 |
+ if(stats_cmd_table[i].need_admin && !IsOperAdmin(source_p)) |
252 |
+@@ -285,7 +285,7 @@ stats_connect(struct Client *source_p) |
253 |
+ (ConfigServerHide.flatten_links && !IsExemptShide(source_p))) && |
254 |
+ !IsOper(source_p)) |
255 |
+ { |
256 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
257 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
258 |
+ form_str(ERR_NOPRIVILEGES)); |
259 |
+ return; |
260 |
+ } |
261 |
+@@ -487,7 +487,7 @@ stats_hubleaf(struct Client *source_p) |
262 |
+ (ConfigServerHide.flatten_links && !IsExemptShide(source_p))) && |
263 |
+ !IsOper(source_p)) |
264 |
+ { |
265 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
266 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
267 |
+ form_str (ERR_NOPRIVILEGES)); |
268 |
+ return; |
269 |
+ } |
270 |
+@@ -513,7 +513,7 @@ stats_auth (struct Client *source_p) |
271 |
+ { |
272 |
+ /* Oper only, if unopered, return ERR_NOPRIVS */ |
273 |
+ if((ConfigFileEntry.stats_i_oper_only == 2) && !IsOper (source_p)) |
274 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
275 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
276 |
+ form_str (ERR_NOPRIVILEGES)); |
277 |
+ |
278 |
+ /* If unopered, Only return matching auth blocks */ |
279 |
+@@ -556,7 +556,7 @@ stats_tklines(struct Client *source_p) |
280 |
+ { |
281 |
+ /* Oper only, if unopered, return ERR_NOPRIVS */ |
282 |
+ if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper (source_p)) |
283 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
284 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
285 |
+ form_str (ERR_NOPRIVILEGES)); |
286 |
+ |
287 |
+ /* If unopered, Only return matching klines */ |
288 |
+@@ -621,7 +621,7 @@ stats_klines(struct Client *source_p) |
289 |
+ { |
290 |
+ /* Oper only, if unopered, return ERR_NOPRIVS */ |
291 |
+ if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper (source_p)) |
292 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
293 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
294 |
+ form_str (ERR_NOPRIVILEGES)); |
295 |
+ |
296 |
+ /* If unopered, Only return matching klines */ |
297 |
+@@ -689,7 +689,7 @@ stats_oper(struct Client *source_p) |
298 |
+ |
299 |
+ if(!IsOper(source_p) && ConfigFileEntry.stats_o_oper_only) |
300 |
+ { |
301 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
302 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
303 |
+ form_str (ERR_NOPRIVILEGES)); |
304 |
+ return; |
305 |
+ } |
306 |
+@@ -752,7 +752,7 @@ static void |
307 |
+ stats_ports (struct Client *source_p) |
308 |
+ { |
309 |
+ if(!IsOper (source_p) && ConfigFileEntry.stats_P_oper_only) |
310 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
311 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
312 |
+ form_str (ERR_NOPRIVILEGES)); |
313 |
+ else |
314 |
+ show_ports (source_p); |
315 |
+@@ -1063,7 +1063,7 @@ stats_servers (struct Client *source_p) |
316 |
+ if(ConfigServerHide.flatten_links && !IsOper(source_p) && |
317 |
+ !IsExemptShide(source_p)) |
318 |
+ { |
319 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
320 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
321 |
+ form_str (ERR_NOPRIVILEGES)); |
322 |
+ return; |
323 |
+ } |
324 |
+@@ -1137,7 +1137,7 @@ static void |
325 |
+ stats_class(struct Client *source_p) |
326 |
+ { |
327 |
+ if(ConfigFileEntry.stats_y_oper_only && !IsOper(source_p)) |
328 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
329 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
330 |
+ form_str (ERR_NOPRIVILEGES)); |
331 |
+ else |
332 |
+ report_classes(source_p); |
333 |
+@@ -1411,7 +1411,7 @@ stats_servlinks (struct Client *source_p) |
334 |
+ if(ConfigServerHide.flatten_links && !IsOper (source_p) && |
335 |
+ !IsExemptShide(source_p)) |
336 |
+ { |
337 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, |
338 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", |
339 |
+ form_str (ERR_NOPRIVILEGES)); |
340 |
+ return; |
341 |
+ } |
342 |
+diff --git a/src/chmode.c b/src/chmode.c |
343 |
+index 0a43199..cd649d3 100644 |
344 |
+--- a/src/chmode.c |
345 |
++++ b/src/chmode.c |
346 |
+@@ -644,7 +644,7 @@ chm_hidden(struct Client *source_p, struct Channel *chptr, |
347 |
+ if(!IsOper(source_p) && !IsServer(source_p)) |
348 |
+ { |
349 |
+ if(!(*errors & SM_ERR_NOPRIVS)) |
350 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, form_str(ERR_NOPRIVILEGES)); |
351 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES)); |
352 |
+ *errors |= SM_ERR_NOPRIVS; |
353 |
+ return; |
354 |
+ } |
355 |
+@@ -734,7 +734,7 @@ chm_staff(struct Client *source_p, struct Channel *chptr, |
356 |
+ if(!IsOper(source_p) && !IsServer(source_p)) |
357 |
+ { |
358 |
+ if(!(*errors & SM_ERR_NOPRIVS)) |
359 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, form_str(ERR_NOPRIVILEGES)); |
360 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES)); |
361 |
+ *errors |= SM_ERR_NOPRIVS; |
362 |
+ return; |
363 |
+ } |
364 |
+diff --git a/src/parse.c b/src/parse.c |
365 |
+index a8ce091..9e17de4 100644 |
366 |
+--- a/src/parse.c |
367 |
++++ b/src/parse.c |
368 |
+@@ -719,7 +719,7 @@ static void do_alias(struct alias_entry *aptr, struct Client *source_p, char *te |
369 |
+ int |
370 |
+ m_not_oper(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) |
371 |
+ { |
372 |
+- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, form_str(ERR_NOPRIVILEGES)); |
373 |
++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES)); |
374 |
+ return 0; |
375 |
+ } |
376 |
+ |
377 |
+diff --git a/src/s_auth.c b/src/s_auth.c |
378 |
+index 2644ff1..52e4633 100644 |
379 |
+--- a/src/s_auth.c |
380 |
++++ b/src/s_auth.c |
381 |
+@@ -116,7 +116,7 @@ typedef enum |
382 |
+ } |
383 |
+ ReportType; |
384 |
+ |
385 |
+-#define sendheader(c, r) sendto_one_notice(c, HeaderMessages[(r)]) |
386 |
++#define sendheader(c, r) sendto_one_notice(c, "%s", HeaderMessages[(r)]) |
387 |
+ |
388 |
+ static rb_dlink_list auth_poll_list; |
389 |
+ static rb_bh *auth_heap; |
390 |
+diff --git a/src/sslproc.c b/src/sslproc.c |
391 |
+index 11fadbb..51078fb 100644 |
392 |
+--- a/src/sslproc.c |
393 |
++++ b/src/sslproc.c |
394 |
+@@ -455,13 +455,13 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl) |
395 |
+ break; |
396 |
+ case 'I': |
397 |
+ ssl_ok = 0; |
398 |
+- ilog(L_MAIN, cannot_setup_ssl); |
399 |
+- sendto_realops_snomask(SNO_GENERAL, L_ALL, cannot_setup_ssl); |
400 |
++ ilog(L_MAIN, "%s", cannot_setup_ssl); |
401 |
++ sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", cannot_setup_ssl); |
402 |
+ case 'U': |
403 |
+ zlib_ok = 0; |
404 |
+ ssl_ok = 0; |
405 |
+- ilog(L_MAIN, no_ssl_or_zlib); |
406 |
+- sendto_realops_snomask(SNO_GENERAL, L_ALL, no_ssl_or_zlib); |
407 |
++ ilog(L_MAIN, "%s", no_ssl_or_zlib); |
408 |
++ sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", no_ssl_or_zlib); |
409 |
+ ssl_killall(); |
410 |
+ break; |
411 |
+ case 'z': |
412 |
+-- |
413 |
+2.13.0 |
414 |
+ |
415 |
|
416 |
diff --git a/net-irc/shadowircd/files/shadowircd.initd-r1 b/net-irc/shadowircd/files/shadowircd.initd-r1 |
417 |
new file mode 100644 |
418 |
index 00000000000..38ccab8b3f3 |
419 |
--- /dev/null |
420 |
+++ b/net-irc/shadowircd/files/shadowircd.initd-r1 |
421 |
@@ -0,0 +1,26 @@ |
422 |
+#!/sbin/openrc-run |
423 |
+# Copyright 1999-2017 Gentoo Foundation |
424 |
+# Distributed under the terms of the GNU General Public License v2 |
425 |
+ |
426 |
+command="/usr/bin/shadowircd-ircd" |
427 |
+command_args="${SHADOWIRCD_OPTS}" |
428 |
+command_user="shadowircd" |
429 |
+extra_started_commands="reload" |
430 |
+pidfile="/run/shadowircd/ircd.pid" |
431 |
+ |
432 |
+depend() { |
433 |
+ use dns net |
434 |
+ provide ircd |
435 |
+} |
436 |
+ |
437 |
+start_pre() { |
438 |
+ ebegin "Creating /run/shadowircd for ${SVCNAME}" |
439 |
+ checkpath --directory --owner :shadowircd --mode 0770 /run/shadowircd |
440 |
+ eend $? |
441 |
+} |
442 |
+ |
443 |
+reload() { |
444 |
+ ebegin "Reloading ${SVCNAME}" |
445 |
+ start-stop-daemon --signal HUP --pidfile "${pidfile}" |
446 |
+ eend $? |
447 |
+} |
448 |
|
449 |
diff --git a/net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild b/net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild |
450 |
new file mode 100644 |
451 |
index 00000000000..12883e6195d |
452 |
--- /dev/null |
453 |
+++ b/net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild |
454 |
@@ -0,0 +1,95 @@ |
455 |
+# Copyright 1999-2017 Gentoo Foundation |
456 |
+# Distributed under the terms of the GNU General Public License v2 |
457 |
+ |
458 |
+EAPI=6 |
459 |
+ |
460 |
+inherit user |
461 |
+ |
462 |
+DESCRIPTION="An IRCd based on charybdis that adds several useful features" |
463 |
+HOMEPAGE="http://shadowircd.net" |
464 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz" |
465 |
+LICENSE="GPL-2" |
466 |
+ |
467 |
+SLOT="0" |
468 |
+KEYWORDS="~amd64 ~x86" |
469 |
+IUSE="debug +ipv6 largenet ssl zlib" |
470 |
+ |
471 |
+RDEPEND="ssl? ( dev-libs/openssl:0 ) |
472 |
+ zlib? ( sys-libs/zlib )" |
473 |
+DEPEND="${RDEPEND} |
474 |
+ virtual/yacc |
475 |
+ sys-devel/flex" |
476 |
+ |
477 |
+S="${WORKDIR}/${PN}-${P}" |
478 |
+ |
479 |
+PATCHES=( "${FILESDIR}/format-security.patch" ) |
480 |
+ |
481 |
+pkg_setup() { |
482 |
+ enewgroup ${PN} |
483 |
+ enewuser ${PN} -1 -1 "${EPREFIX}"/usr ${PN} |
484 |
+} |
485 |
+ |
486 |
+src_prepare() { |
487 |
+ default |
488 |
+ |
489 |
+ # Fill the example configuration file with proper paths. |
490 |
+ sed -i \ |
491 |
+ -e "s:path =.*modules:path = \"$(get_libdir)/${PN}/modules:g" \ |
492 |
+ -e "s:etc/:../etc/${PN}/:g" \ |
493 |
+ -e "s:logs/:../var/log/shadowircd/:g" \ |
494 |
+ -e "s:test\.\(cert\|key\):ssl.\1:g" \ |
495 |
+ doc/example.conf \ |
496 |
+ doc/reference.conf \ |
497 |
+ || die |
498 |
+} |
499 |
+ |
500 |
+src_configure() { |
501 |
+ econf \ |
502 |
+ ac_cv_prog_cc_g=no \ |
503 |
+ --disable-gnutls \ |
504 |
+ $(use_enable debug assert soft) \ |
505 |
+ $(use_enable debug iodebug) \ |
506 |
+ $(use_enable ipv6) \ |
507 |
+ $(use_enable !largenet small-net) \ |
508 |
+ $(use_enable ssl openssl) \ |
509 |
+ $(use_enable zlib) \ |
510 |
+ --with-program-prefix=shadowircd- \ |
511 |
+ \ |
512 |
+ --enable-fhs-paths \ |
513 |
+ --sysconfdir="${EPREFIX}"/etc/${PN} \ |
514 |
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN} \ |
515 |
+ --with-logdir="${EPREFIX}"/var/log/${PN} \ |
516 |
+ --with-moduledir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ |
517 |
+ --with-rundir="${EPREFIX}"/run |
518 |
+} |
519 |
+ |
520 |
+src_install() { |
521 |
+ default |
522 |
+ |
523 |
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} |
524 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
525 |
+ |
526 |
+ insinto etc/${PN} |
527 |
+ newins doc/reference.conf ircd.conf |
528 |
+ |
529 |
+ keepdir var/{lib,log}/${PN} |
530 |
+ |
531 |
+ # The runtime directory will be created by the init script, so we |
532 |
+ # kill this here to avoid a QA warning about it. |
533 |
+ rm -rf "${D}"/run || die |
534 |
+ |
535 |
+ # shadowircd needs writing to its state (bandb) and log directories |
536 |
+ fowners :shadowircd /var/{lib,log}/${PN} |
537 |
+ fperms 770 /var/{lib,log}/${PN} |
538 |
+ |
539 |
+ # ensure that shadowircd can access but not modify its configuration |
540 |
+ # while protecting it from others |
541 |
+ fowners :shadowircd /etc/${PN}{,/ircd.conf} |
542 |
+ fperms 750 /etc/${PN} |
543 |
+ fperms 640 /etc/${PN}/ircd.conf |
544 |
+} |
545 |
+ |
546 |
+pkg_postinst() { |
547 |
+ elog "All of the shadowircd binaries in PATH have been prefixed with" |
548 |
+ elog "'shadowircd-' to prevent file collisions." |
549 |
+} |