diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2021-03-29 22:16:13 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2021-03-29 22:16:13 -0400 |
commit | 2b3b0bac1a60894fe8d1d5b2d19b0c14bdc6d692 (patch) | |
tree | d9ae6db499c0c96171da82a4e914fa08cac29ddd /net-dns | |
parent | app-laptop/hdapsd: new EAPI=7 revision. (diff) | |
download | gentoo-2b3b0bac1a60894fe8d1d5b2d19b0c14bdc6d692.tar.gz gentoo-2b3b0bac1a60894fe8d1d5b2d19b0c14bdc6d692.tar.bz2 gentoo-2b3b0bac1a60894fe8d1d5b2d19b0c14bdc6d692.zip |
net-dns/updatedd: new revision to fix OVH support.
Closes: https://bugs.gentoo.org/777423
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'net-dns')
-rw-r--r-- | net-dns/updatedd/files/fix-ovh-support.patch | 70 | ||||
-rw-r--r-- | net-dns/updatedd/updatedd-2.6-r6.ebuild | 29 |
2 files changed, 99 insertions, 0 deletions
diff --git a/net-dns/updatedd/files/fix-ovh-support.patch b/net-dns/updatedd/files/fix-ovh-support.patch new file mode 100644 index 000000000000..da9e64d90857 --- /dev/null +++ b/net-dns/updatedd/files/fix-ovh-support.patch @@ -0,0 +1,70 @@ +https://bugs.gentoo.org/777423 + +--- a/src/plugins/libovh.c ++++ b/src/plugins/libovh.c +@@ -181,6 +181,7 @@ + + char *b64user; + char message[BUFLEN]; ++ size_t pos, towrite; + + if(strlen(args->login) > 128) { + ret_msg(NONE, "username is too long"); +@@ -220,10 +221,18 @@ + "\n--------------------------------------\n" + "%s--------------------------------------\n\n", + message); +- +- if(write(s, message, strlen(message)) == -1) { +- ret_msg(PERR, "write() failed"); +- return RET_WARNING; ++ ++ for (pos = 0, towrite = strlen(message); towrite > 0; ) { ++ ssize_t ret; ++ ++ ret = write(s, message + pos, towrite - pos); ++ if(ret <= 0) { ++ ret_msg(PERR, "write() failed"); ++ return RET_WARNING; ++ } ++ ++ pos += ret; ++ towrite -= ret; + } + + free(b64user); +@@ -236,13 +245,22 @@ + { + + int n; +- char server_msg[BUFSIZE], *ptr; ++ char server_msg[BUFLEN], *ptr; + + /* get server_msg */ + (void)memset(server_msg, 0, sizeof(server_msg)); +- if(read(s, server_msg, sizeof(server_msg) - 1) < 0) { +- ret_msg(PERR, "read() failed"); +- return RET_WARNING; ++ ++ for (ptr = server_msg; ptr < &server_msg[BUFLEN]; ) { ++ ssize_t ret; ++ ++ ret = read(s, ptr, &server_msg[BUFLEN] - ptr); ++ if (ret < 0) { ++ ret_msg(PERR, "read() failed"); ++ return RET_WARNING; ++ } else if (ret == 0) ++ break; ++ ++ ptr += ret; + } + + print_debug("\n\nServer message:" +@@ -267,6 +285,7 @@ + } + } + } ++ ret_msg(NONE, "unknown server response"); + } else if(strstr(server_msg, "401 Authorization Required")) { + ret_msg(NONE, "wrong username or password"); + } else { diff --git a/net-dns/updatedd/updatedd-2.6-r6.ebuild b/net-dns/updatedd/updatedd-2.6-r6.ebuild new file mode 100644 index 000000000000..d352c43644a3 --- /dev/null +++ b/net-dns/updatedd/updatedd-2.6-r6.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Dynamic DNS client with plugins for several dynamic dns services" +HOMEPAGE="https://savannah.nongnu.org/projects/updatedd/" +SRC_URI="https://savannah.nongnu.org/download/updatedd/${PN}_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="dev-lang/perl + dev-perl/IO-Socket-Timeout" + +PATCHES=( + "${FILESDIR}/${P}-options.patch" + "${FILESDIR}/fix-ovh-DYNDNSHOST.patch" + "${FILESDIR}/respect-docdir.patch" + "${FILESDIR}/set-socket-timeouts-for-ipserv.patch" + "${FILESDIR}/fix-ovh-support.patch" +) + +src_configure() { + econf --disable-static +} |