diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-irc/shadowircd |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-irc/shadowircd')
-rw-r--r-- | net-irc/shadowircd/Manifest | 10 | ||||
-rw-r--r-- | net-irc/shadowircd/files/format-security.patch | 384 | ||||
-rw-r--r-- | net-irc/shadowircd/files/shadowircd.confd | 6 | ||||
-rw-r--r-- | net-irc/shadowircd/files/shadowircd.initd | 38 | ||||
-rw-r--r-- | net-irc/shadowircd/files/shadowircd.initd-r1 | 26 | ||||
-rw-r--r-- | net-irc/shadowircd/metadata.xml | 10 | ||||
-rw-r--r-- | net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild | 95 | ||||
-rw-r--r-- | net-irc/shadowircd/shadowircd-6.3.3.ebuild | 91 |
8 files changed, 660 insertions, 0 deletions
diff --git a/net-irc/shadowircd/Manifest b/net-irc/shadowircd/Manifest new file mode 100644 index 000000000000..588c85d33d58 --- /dev/null +++ b/net-irc/shadowircd/Manifest @@ -0,0 +1,10 @@ +AUX format-security.patch 14907 SHA256 1be22c026a500063bd064a435c600f2777b24d273ea91732333a99e664a7cfec SHA512 1f258c683f49d053aed52a30e9d77ce1aeda39d4376332a8e2caa8247f3d9b476accf5847ce5c04e7ae322bf88bcb40d0849de40d4f1d270cde7df6b5609c8a0 WHIRLPOOL 8acbbc3b4d084c4cb657f3576dc124b2e10a67193cb4d7475a61df72a3772a171576220efffa1ea9e76a20933fd83075c565d40fbc2f3370a1dd7e6fd9dd8271 +AUX shadowircd.confd 196 SHA256 adc35dde76f6425581ece95de8f7ef53fa7adb8deb294f61a675a80ad7b39604 SHA512 64ffcf4f2d90009e2d085f920f00de20812344c1cf03f1f3c128176f16e1dc7dcba70ea2193e5ac97775fc95a4fc6d2413826d0f29f58d077a50e4eccfc6f267 WHIRLPOOL a979829b44ac646539f11d65728c3ee90d0982aaca8790f82faa3b123c92789202324f3481ddd75d35364897bedddd7fb83fd26e85344c5b88cfd61d5b254a6b +AUX shadowircd.initd 857 SHA256 b95c41941cc82758c70ec54c08d6ecfd00431a1b21feb3f5bbf5d88db9939669 SHA512 7e9d8b8d7eea5e6ff8474b862e0b07aec426b96268b41fc294bb97f26609eda2518b65e285cbef80876b111ab94dd8d7c80a52ca9425cc7f9385516a3f4bd74b WHIRLPOOL 5992ee26b4591fe1666902963cc6fc4298d06d523de578ace439c8da74c5221dbabaf521ffa3f2198ca8957282609f6553f4c24657666459c477db7a2d845cd0 +AUX shadowircd.initd-r1 595 SHA256 9a307878131c76c2e6311a47d86fb56ab0c5dcd0256ce5ceec5849dc2c8ce0cd SHA512 d8c168c7fbe60ec0d90e780158a66a4b1f1a916a6e24a40ea834b43f7e9f6d153607a565e79de51b0b7b39e0750124cf41ac49f50bcfc3ce5ebecf0d73a59342 WHIRLPOOL 7ed99128406e08f361ee9812e6034ac3edf1a585cf3c660213b8e7f7b64f884f962e54e7c3479637010fbbe5187934ce52bab3c77ab7bf13dde3778c29ff8276 +DIST shadowircd-6.3.3.tar.gz 1980432 SHA256 a3b6189a473e837d4248b8f18b1e8454ab111c8eafeb46eda477095771636f24 SHA512 f3638bee6d49c56738cf05dd7c67d93344ed5787eb8777589390dbc38a1481e9a28895bdd4534124dcc8dbe247f3e28e299fe0bc0bb89e4d974b4aff734701d4 WHIRLPOOL 59e76beab8814f5fcfe8cc60cf2363e4ec0a8306a6503f28b234d805ae71b2c15bdefe9695ebf1d280932328f14669a295954b86c239c09b498f8b1b2bc95369 +EBUILD shadowircd-6.3.3-r1.ebuild 2383 SHA256 5414c1ff9d512fb7c0e2a291f8d8156772c8f79f6dd775520aec982070fb14af SHA512 257222f868a452a11f4350c28c19e452a52fa7ab5acef0e26d214c405ee25a9ff15d4c0bd84b2bb0ec6d8550747bfa244b54462ee2411afb898256438ba7840f WHIRLPOOL c9e825c8c81dd7446eb5eb3345b1a7af3f23b7d6587ca523b8e0846926269005c42f03f68fe2f34e7387e9987c4bd989361b6d9a185633743e9ba9e1fb897e05 +EBUILD shadowircd-6.3.3.ebuild 2340 SHA256 40e921a291927c321308112857d9de183c29eb885ffb3a6ee3af4f0ddddc70cc SHA512 16f3f9028bf9847d551e73f37b01e5b98ca63d82ad5e16cb3d77a1d4edc81f9ef863e1c10199a046a148bff865e107077b4420787f6c5dbd3795d26b004759a8 WHIRLPOOL e9dbd3907cb4a451ce3df21aa7864abc57bd2816de5b0c28e267a6f29a7cd901988b303c8efb615fe9a581b53f5f12d52595a00d734c3ae1c761381cc522ba2d +MISC ChangeLog 2886 SHA256 2f182feeee69d679f02c08fb4db743ce3f33ab86a00d1d7fd412f0422e976bb7 SHA512 6b838ef215c529448d7d23956ba1ab561cbfc504ed78519a63a70a20c9c01c0b86e53f459d99042d793ba2401bbd66ea08d8fe14970d941005c59058f291ffa5 WHIRLPOOL 5c6b57f8247dc9eac6fb56e26329f21fcce9b3808625d72d5de7f76caa534366f7bad3415e0a3deeb8faaf2560a54a73a4f07c40578b4ec4280db740ec109b63 +MISC ChangeLog-2015 1532 SHA256 c403b7940cd51f2eb1d59f916218f66d1970c6a3668a2464232e405f88e4d2b0 SHA512 f73d6952485622dc0ddff935714225cf6f12205fccb68ee82a7de119c71b84899a9ba78f053715a7a0d8b2d2063133c4b6ed62b136c326bccacea6cfc9773bfa WHIRLPOOL 206230bc52ab7c319394504f4625cf7d7a9606d5160bee85dbb3147c2a4013c15b42cd3822d1e8f4928c24829c17926b990a8d66c4c06b0a05830d2a82346a35 +MISC metadata.xml 320 SHA256 71e862dec279c4288e1f0ff20d67ba2b7de0fd463fcb3343b7af1876f0e3c662 SHA512 6af904bec4c184c6f358b23ec08426cd5b0c1e670e559e21160b42fb5a9d3ab80f48974769cf38495df33bd7d8926bf1e46f8a3ace3124588b306f299997b5fd WHIRLPOOL 201b46dec3f34d98425b0212897cc598e622c89d1c5c5cca9c0e0b90cd61affb661894f6be7c374ff0f0cd3dacac48a53be66bc55a1a395691400b493d86fb85 diff --git a/net-irc/shadowircd/files/format-security.patch b/net-irc/shadowircd/files/format-security.patch new file mode 100644 index 000000000000..bd6e26e28a59 --- /dev/null +++ b/net-irc/shadowircd/files/format-security.patch @@ -0,0 +1,384 @@ +From 6055fe3ee3b7b932e2a21160251fff0f0c6bcc39 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Mon, 24 Jul 2017 10:39:43 -0400 +Subject: [PATCH 1/1] Supply trivial format strings to fix format-security + warnings. + +This commit adds a trivial format string "%s" to a number of function +calls that are otherwise missing them. This avoids GCC's +format-security warnings, which cause compilation failures with +-Werror=format-security. + +Gentoo-Bug: 520620 +--- + bandb/bandb.c | 2 +- + modules/core/m_kill.c | 4 ++-- + modules/m_away.c | 4 ++-- + modules/m_challenge.c | 8 ++++---- + modules/m_info.c | 6 +++--- + modules/m_map.c | 4 ++-- + modules/m_oper.c | 6 +++--- + modules/m_stats.c | 22 +++++++++++----------- + src/chmode.c | 4 ++-- + src/parse.c | 2 +- + src/s_auth.c | 2 +- + src/sslproc.c | 8 ++++---- + 12 files changed, 36 insertions(+), 36 deletions(-) + +diff --git a/bandb/bandb.c b/bandb/bandb.c +index 33166b1..2d272a1 100644 +--- a/bandb/bandb.c ++++ b/bandb/bandb.c +@@ -289,7 +289,7 @@ db_error_cb(const char *errstr) + { + char buf[256]; + rb_snprintf(buf, sizeof(buf), "! :%s", errstr); +- rb_helper_write(bandb_helper, buf); ++ rb_helper_write(bandb_helper, "%s", buf); + rb_sleep(2 << 30, 0); + exit(1); + } +diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c +index 80df7df..2fa91da 100644 +--- a/modules/core/m_kill.c ++++ b/modules/core/m_kill.c +@@ -97,7 +97,7 @@ mo_kill(struct Client *client_p, struct Client *source_p, int parc, const char * + if((target_p = get_history(user, (long) KILLCHASETIMELIMIT)) == NULL) + { + if (strchr(user, '.')) +- sendto_one_numeric(source_p, ERR_CANTKILLSERVER, form_str(ERR_CANTKILLSERVER)); ++ sendto_one_numeric(source_p, ERR_CANTKILLSERVER, "%s", form_str(ERR_CANTKILLSERVER)); + else + sendto_one_numeric(source_p, ERR_NOSUCHNICK, + form_str(ERR_NOSUCHNICK), user); +@@ -216,7 +216,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char * + + if(IsServer(target_p) || IsMe(target_p)) + { +- sendto_one_numeric(source_p, ERR_CANTKILLSERVER, form_str(ERR_CANTKILLSERVER)); ++ sendto_one_numeric(source_p, ERR_CANTKILLSERVER, "%s", form_str(ERR_CANTKILLSERVER)); + return 0; + } + +diff --git a/modules/m_away.c b/modules/m_away.c +index 557371e..13c4c39 100644 +--- a/modules/m_away.c ++++ b/modules/m_away.c +@@ -85,7 +85,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p + free_away(source_p); + } + if(MyConnect(source_p)) +- sendto_one_numeric(source_p, RPL_UNAWAY, form_str(RPL_UNAWAY)); ++ sendto_one_numeric(source_p, RPL_UNAWAY, "%s", form_str(RPL_UNAWAY)); + return 0; + } + +@@ -99,7 +99,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p + } + + if(MyConnect(source_p)) +- sendto_one_numeric(source_p, RPL_NOWAWAY, form_str(RPL_NOWAWAY)); ++ sendto_one_numeric(source_p, RPL_NOWAWAY, "%s", form_str(RPL_NOWAWAY)); + + return 0; + } +diff --git a/modules/m_challenge.c b/modules/m_challenge.c +index 2066095..b8514c4 100644 +--- a/modules/m_challenge.c ++++ b/modules/m_challenge.c +@@ -172,7 +172,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch + + if(oper_p == NULL) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", + source_p->localClient->opername, source_p->name, + source_p->username, source_p->host, +@@ -203,7 +203,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch + + if(oper_p == NULL) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", + parv[1], source_p->name, + source_p->username, source_p->host, source_p->sockhost); +@@ -223,7 +223,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch + + if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p)) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED CHALLENGE (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS", + parv[1], source_p->name, source_p->username, source_p->host, + source_p->sockhost); +@@ -241,7 +241,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch + { + if (source_p->certfp == NULL || strcasecmp(source_p->certfp, oper_p->certfp)) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- client certificate fingerprint mismatch", + parv[1], source_p->name, + source_p->username, source_p->host, source_p->sockhost); +diff --git a/modules/m_info.c b/modules/m_info.c +index dd14294..bab156f 100644 +--- a/modules/m_info.c ++++ b/modules/m_info.c +@@ -722,7 +722,7 @@ m_info(struct Client *client_p, struct Client *source_p, int parc, const char *p + /* safe enough to give this on a local connect only */ + sendto_one(source_p, form_str(RPL_LOAD2HI), + me.name, source_p->name, "INFO"); +- sendto_one_numeric(source_p, RPL_ENDOFINFO, form_str(RPL_ENDOFINFO)); ++ sendto_one_numeric(source_p, RPL_ENDOFINFO, "%s", form_str(RPL_ENDOFINFO)); + return 0; + } + else +@@ -736,7 +736,7 @@ m_info(struct Client *client_p, struct Client *source_p, int parc, const char *p + send_info_text(source_p); + send_birthdate_online_time(source_p); + +- sendto_one_numeric(source_p, RPL_ENDOFINFO, form_str(RPL_ENDOFINFO)); ++ sendto_one_numeric(source_p, RPL_ENDOFINFO, "%s", form_str(RPL_ENDOFINFO)); + return 0; + } + +@@ -761,7 +761,7 @@ mo_info(struct Client *client_p, struct Client *source_p, int parc, const char * + + send_birthdate_online_time(source_p); + +- sendto_one_numeric(source_p, RPL_ENDOFINFO, form_str(RPL_ENDOFINFO)); ++ sendto_one_numeric(source_p, RPL_ENDOFINFO, "%s", form_str(RPL_ENDOFINFO)); + } + + return 0; +diff --git a/modules/m_map.c b/modules/m_map.c +index 7a45140..baadc86 100644 +--- a/modules/m_map.c ++++ b/modules/m_map.c +@@ -59,7 +59,7 @@ m_map(struct Client *client_p, struct Client *source_p, int parc, const char *pa + } + + dump_map(client_p, &me, buf); +- sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND)); ++ sendto_one_numeric(client_p, RPL_MAPEND, "%s", form_str(RPL_MAPEND)); + return 0; + } + +@@ -71,7 +71,7 @@ mo_map(struct Client *client_p, struct Client *source_p, int parc, const char *p + { + dump_map(client_p, &me, buf); + scache_send_missing(client_p); +- sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND)); ++ sendto_one_numeric(client_p, RPL_MAPEND, "%s", form_str(RPL_MAPEND)); + + return 0; + } +diff --git a/modules/m_oper.c b/modules/m_oper.c +index b403b28..af1e008 100644 +--- a/modules/m_oper.c ++++ b/modules/m_oper.c +@@ -83,7 +83,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p + + if(oper_p == NULL) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", + name, source_p->name, + source_p->username, source_p->host, source_p->sockhost); +@@ -100,7 +100,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p + + if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p)) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS", + name, source_p->name, + source_p->username, source_p->host, source_p->sockhost); +@@ -118,7 +118,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p + { + if (source_p->certfp == NULL || strcasecmp(source_p->certfp, oper_p->certfp)) + { +- sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST)); ++ sendto_one_numeric(source_p, ERR_NOOPERHOST, "%s", form_str(ERR_NOOPERHOST)); + ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- client certificate fingerprint mismatch", + name, source_p->name, + source_p->username, source_p->host, source_p->sockhost); +diff --git a/modules/m_stats.c b/modules/m_stats.c +index dc826bc..51555b4 100644 +--- a/modules/m_stats.c ++++ b/modules/m_stats.c +@@ -223,7 +223,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char * + if(stats_cmd_table[i].need_oper && !IsOper(source_p)) + { + sendto_one_numeric(source_p, ERR_NOPRIVILEGES, +- form_str (ERR_NOPRIVILEGES)); ++ "%s", form_str (ERR_NOPRIVILEGES)); + break; + } + if(stats_cmd_table[i].need_admin && !IsOperAdmin(source_p)) +@@ -285,7 +285,7 @@ stats_connect(struct Client *source_p) + (ConfigServerHide.flatten_links && !IsExemptShide(source_p))) && + !IsOper(source_p)) + { +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str(ERR_NOPRIVILEGES)); + return; + } +@@ -487,7 +487,7 @@ stats_hubleaf(struct Client *source_p) + (ConfigServerHide.flatten_links && !IsExemptShide(source_p))) && + !IsOper(source_p)) + { +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + return; + } +@@ -513,7 +513,7 @@ stats_auth (struct Client *source_p) + { + /* Oper only, if unopered, return ERR_NOPRIVS */ + if((ConfigFileEntry.stats_i_oper_only == 2) && !IsOper (source_p)) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + + /* If unopered, Only return matching auth blocks */ +@@ -556,7 +556,7 @@ stats_tklines(struct Client *source_p) + { + /* Oper only, if unopered, return ERR_NOPRIVS */ + if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper (source_p)) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + + /* If unopered, Only return matching klines */ +@@ -621,7 +621,7 @@ stats_klines(struct Client *source_p) + { + /* Oper only, if unopered, return ERR_NOPRIVS */ + if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper (source_p)) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + + /* If unopered, Only return matching klines */ +@@ -689,7 +689,7 @@ stats_oper(struct Client *source_p) + + if(!IsOper(source_p) && ConfigFileEntry.stats_o_oper_only) + { +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + return; + } +@@ -752,7 +752,7 @@ static void + stats_ports (struct Client *source_p) + { + if(!IsOper (source_p) && ConfigFileEntry.stats_P_oper_only) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + else + show_ports (source_p); +@@ -1063,7 +1063,7 @@ stats_servers (struct Client *source_p) + if(ConfigServerHide.flatten_links && !IsOper(source_p) && + !IsExemptShide(source_p)) + { +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + return; + } +@@ -1137,7 +1137,7 @@ static void + stats_class(struct Client *source_p) + { + if(ConfigFileEntry.stats_y_oper_only && !IsOper(source_p)) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + else + report_classes(source_p); +@@ -1411,7 +1411,7 @@ stats_servlinks (struct Client *source_p) + if(ConfigServerHide.flatten_links && !IsOper (source_p) && + !IsExemptShide(source_p)) + { +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", + form_str (ERR_NOPRIVILEGES)); + return; + } +diff --git a/src/chmode.c b/src/chmode.c +index 0a43199..cd649d3 100644 +--- a/src/chmode.c ++++ b/src/chmode.c +@@ -644,7 +644,7 @@ chm_hidden(struct Client *source_p, struct Channel *chptr, + if(!IsOper(source_p) && !IsServer(source_p)) + { + if(!(*errors & SM_ERR_NOPRIVS)) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, form_str(ERR_NOPRIVILEGES)); ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES)); + *errors |= SM_ERR_NOPRIVS; + return; + } +@@ -734,7 +734,7 @@ chm_staff(struct Client *source_p, struct Channel *chptr, + if(!IsOper(source_p) && !IsServer(source_p)) + { + if(!(*errors & SM_ERR_NOPRIVS)) +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, form_str(ERR_NOPRIVILEGES)); ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES)); + *errors |= SM_ERR_NOPRIVS; + return; + } +diff --git a/src/parse.c b/src/parse.c +index a8ce091..9e17de4 100644 +--- a/src/parse.c ++++ b/src/parse.c +@@ -719,7 +719,7 @@ static void do_alias(struct alias_entry *aptr, struct Client *source_p, char *te + int + m_not_oper(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) + { +- sendto_one_numeric(source_p, ERR_NOPRIVILEGES, form_str(ERR_NOPRIVILEGES)); ++ sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES)); + return 0; + } + +diff --git a/src/s_auth.c b/src/s_auth.c +index 2644ff1..52e4633 100644 +--- a/src/s_auth.c ++++ b/src/s_auth.c +@@ -116,7 +116,7 @@ typedef enum + } + ReportType; + +-#define sendheader(c, r) sendto_one_notice(c, HeaderMessages[(r)]) ++#define sendheader(c, r) sendto_one_notice(c, "%s", HeaderMessages[(r)]) + + static rb_dlink_list auth_poll_list; + static rb_bh *auth_heap; +diff --git a/src/sslproc.c b/src/sslproc.c +index 11fadbb..51078fb 100644 +--- a/src/sslproc.c ++++ b/src/sslproc.c +@@ -455,13 +455,13 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl) + break; + case 'I': + ssl_ok = 0; +- ilog(L_MAIN, cannot_setup_ssl); +- sendto_realops_snomask(SNO_GENERAL, L_ALL, cannot_setup_ssl); ++ ilog(L_MAIN, "%s", cannot_setup_ssl); ++ sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", cannot_setup_ssl); + case 'U': + zlib_ok = 0; + ssl_ok = 0; +- ilog(L_MAIN, no_ssl_or_zlib); +- sendto_realops_snomask(SNO_GENERAL, L_ALL, no_ssl_or_zlib); ++ ilog(L_MAIN, "%s", no_ssl_or_zlib); ++ sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", no_ssl_or_zlib); + ssl_killall(); + break; + case 'z': +-- +2.13.0 + diff --git a/net-irc/shadowircd/files/shadowircd.confd b/net-irc/shadowircd/files/shadowircd.confd new file mode 100644 index 000000000000..4712b525985d --- /dev/null +++ b/net-irc/shadowircd/files/shadowircd.confd @@ -0,0 +1,6 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Specify any extra options to pass to shadowircd +SHADOWIRCD_OPTS="" diff --git a/net-irc/shadowircd/files/shadowircd.initd b/net-irc/shadowircd/files/shadowircd.initd new file mode 100644 index 000000000000..5b01c2366de7 --- /dev/null +++ b/net-irc/shadowircd/files/shadowircd.initd @@ -0,0 +1,38 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + use dns net + provide ircd +} + +start() { + if ! [ -d /var/run/shadowircd ]; then + ebegin "Creating /var/run/shadowircd for ${SVCNAME}" + mkdir /var/run/shadowircd \ + && chown :shadowircd /var/run/shadowircd \ + && chmod 770 /var/run/shadowircd + eend $? + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/bin/shadowircd-ircd \ + --user shadowircd --pidfile /var/run/shadowircd/ircd.pid \ + ${SHADOWIRCD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile /var/run/shadowircd/ircd.pid + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile /var/run/shadowircd/ircd.pid + eend $? +} diff --git a/net-irc/shadowircd/files/shadowircd.initd-r1 b/net-irc/shadowircd/files/shadowircd.initd-r1 new file mode 100644 index 000000000000..38ccab8b3f3f --- /dev/null +++ b/net-irc/shadowircd/files/shadowircd.initd-r1 @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/shadowircd-ircd" +command_args="${SHADOWIRCD_OPTS}" +command_user="shadowircd" +extra_started_commands="reload" +pidfile="/run/shadowircd/ircd.pid" + +depend() { + use dns net + provide ircd +} + +start_pre() { + ebegin "Creating /run/shadowircd for ${SVCNAME}" + checkpath --directory --owner :shadowircd --mode 0770 /run/shadowircd + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-irc/shadowircd/metadata.xml b/net-irc/shadowircd/metadata.xml new file mode 100644 index 000000000000..d90bc3272748 --- /dev/null +++ b/net-irc/shadowircd/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="largenet">Enable support/tweaks for large networks</flag> + </use> + <upstream> + <remote-id type="github">shadowircd/shadowircd</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild b/net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild new file mode 100644 index 000000000000..12883e6195db --- /dev/null +++ b/net-irc/shadowircd/shadowircd-6.3.3-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit user + +DESCRIPTION="An IRCd based on charybdis that adds several useful features" +HOMEPAGE="http://shadowircd.net" +SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug +ipv6 largenet ssl zlib" + +RDEPEND="ssl? ( dev-libs/openssl:0 ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + virtual/yacc + sys-devel/flex" + +S="${WORKDIR}/${PN}-${P}" + +PATCHES=( "${FILESDIR}/format-security.patch" ) + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 "${EPREFIX}"/usr ${PN} +} + +src_prepare() { + default + + # Fill the example configuration file with proper paths. + sed -i \ + -e "s:path =.*modules:path = \"$(get_libdir)/${PN}/modules:g" \ + -e "s:etc/:../etc/${PN}/:g" \ + -e "s:logs/:../var/log/shadowircd/:g" \ + -e "s:test\.\(cert\|key\):ssl.\1:g" \ + doc/example.conf \ + doc/reference.conf \ + || die +} + +src_configure() { + econf \ + ac_cv_prog_cc_g=no \ + --disable-gnutls \ + $(use_enable debug assert soft) \ + $(use_enable debug iodebug) \ + $(use_enable ipv6) \ + $(use_enable !largenet small-net) \ + $(use_enable ssl openssl) \ + $(use_enable zlib) \ + --with-program-prefix=shadowircd- \ + \ + --enable-fhs-paths \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + --libdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN} \ + --with-logdir="${EPREFIX}"/var/log/${PN} \ + --with-moduledir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ + --with-rundir="${EPREFIX}"/run +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + + insinto etc/${PN} + newins doc/reference.conf ircd.conf + + keepdir var/{lib,log}/${PN} + + # The runtime directory will be created by the init script, so we + # kill this here to avoid a QA warning about it. + rm -rf "${D}"/run || die + + # shadowircd needs writing to its state (bandb) and log directories + fowners :shadowircd /var/{lib,log}/${PN} + fperms 770 /var/{lib,log}/${PN} + + # ensure that shadowircd can access but not modify its configuration + # while protecting it from others + fowners :shadowircd /etc/${PN}{,/ircd.conf} + fperms 750 /etc/${PN} + fperms 640 /etc/${PN}/ircd.conf +} + +pkg_postinst() { + elog "All of the shadowircd binaries in PATH have been prefixed with" + elog "'shadowircd-' to prevent file collisions." +} diff --git a/net-irc/shadowircd/shadowircd-6.3.3.ebuild b/net-irc/shadowircd/shadowircd-6.3.3.ebuild new file mode 100644 index 000000000000..422e14379dd0 --- /dev/null +++ b/net-irc/shadowircd/shadowircd-6.3.3.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit eutils multilib user + +DESCRIPTION="An IRCd based on charybdis that adds several useful features" +HOMEPAGE="http://shadowircd.net" +SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug +ipv6 largenet ssl zlib" + +RDEPEND="ssl? ( dev-libs/openssl ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + virtual/yacc + sys-devel/flex" + +S="${WORKDIR}/${PN}-${P}" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 "${EPREFIX}"/usr ${PN} +} + +src_prepare() { + # Fill the example configuration file with proper paths. + sed -i \ + -e "s:path =.*modules:path = \"$(get_libdir)/${PN}/modules:g" \ + -e "s:etc/:../etc/${PN}/:g" \ + -e "s:logs/:../var/log/shadowircd/:g" \ + -e "s:test\.\(cert\|key\):ssl.\1:g" \ + doc/example.conf \ + doc/reference.conf \ + || die +} + +src_configure() { + econf \ + ac_cv_prog_cc_g=no \ + --disable-gnutls \ + $(use_enable debug assert soft) \ + $(use_enable debug iodebug) \ + $(use_enable ipv6) \ + $(use_enable !largenet small-net) \ + $(use_enable ssl openssl) \ + $(use_enable zlib) \ + --with-program-prefix=shadowircd- \ + \ + --enable-fhs-paths \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + --libdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN} \ + --with-logdir="${EPREFIX}"/var/log/${PN} \ + --with-moduledir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ + --with-rundir="${EPREFIX}"/var/run +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + + insinto etc/${PN} + newins doc/reference.conf ircd.conf + + keepdir var/{lib,log}/${PN} + + # Ensure that if `make install' created /var/run/${PN}, we still + # force the initscript to create that directory. + rm -rf "${D}"/var/run || die + + # shadowircd needs writing to its state (bandb) and log directories + fowners :shadowircd /var/{lib,log}/${PN} + fperms 770 /var/{lib,log}/${PN} + + # ensure that shadowircd can access but not modify its configuration + # while protecting it from others + fowners :shadowircd /etc/${PN}{,/ircd.conf} + fperms 750 /etc/${PN} + fperms 640 /etc/${PN}/ircd.conf +} + +pkg_postinst() { + elog "All of the shadowircd binaries in PATH have been prefixed with" + elog "'shadowircd-' to prevent file collisions." +} |