[proftpd-dfsg] 01/01: Fix FTBS for missing build-indep and in hurd-i386
Mahyuddin Susanto
udienz-guest at moszumanska.debian.org
Wed Aug 24 23:06:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
udienz-guest pushed a commit to branch master
in repository proftpd-dfsg.
commit 929b05c1cfa2257da24b47cf85bd191032b234f0
Author: Mahyuddin Susanto <udienz at gmail.com>
Date: Wed Aug 24 15:29:13 2016 -0700
Fix FTBS for missing build-indep and in hurd-i386
---
contrib/mod_exec.c | 17 ++++++++++++-----
contrib/mod_sftp/keys.c | 12 +++++++++---
contrib/mod_tls.c | 12 +++++++++---
debian/changelog | 8 ++++++++
debian/rules | 3 +++
5 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/contrib/mod_exec.c b/contrib/mod_exec.c
index 936655a..fcaaf45 100644
--- a/contrib/mod_exec.c
+++ b/contrib/mod_exec.c
@@ -742,14 +742,20 @@ static int exec_ssystem(cmd_rec *cmd, config_rec *c, int flags) {
if (fds >= 0) {
int buflen;
- char buf[PIPE_BUF];
+
+ size_t len = fpathconf(exec_stdout_pipe[0], _PC_PIPE_BUF);
+ char *buf = malloc(len);
+ if (buf == NULL) {
+ exec_log("malloc failed: %s", strerror(errno));
+ return errno;
+ }
/* The child sent us something. How thoughtful. */
if (FD_ISSET(exec_stdout_pipe[0], &readfds)) {
- memset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', len);
- buflen = read(exec_stdout_pipe[0], buf, sizeof(buf)-1);
+ buflen = read(exec_stdout_pipe[0], buf, len - 1);
if (buflen > 0) {
if (exec_opts & EXEC_OPT_SEND_STDOUT) {
@@ -796,9 +802,9 @@ static int exec_ssystem(cmd_rec *cmd, config_rec *c, int flags) {
}
if (FD_ISSET(exec_stderr_pipe[0], &readfds)) {
- memset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', len);
- buflen = read(exec_stderr_pipe[0], buf, sizeof(buf)-1);
+ buflen = read(exec_stdout_pipe[0], buf, len - 1);
if (buflen > 0) {
/* Trim trailing CRs and LFs. */
@@ -828,6 +834,7 @@ static int exec_ssystem(cmd_rec *cmd, config_rec *c, int flags) {
}
}
}
+ free(buf);
}
res = waitpid(pid, &status, WNOHANG);
diff --git a/contrib/mod_sftp/keys.c b/contrib/mod_sftp/keys.c
index 1247ea6..597efb8 100644
--- a/contrib/mod_sftp/keys.c
+++ b/contrib/mod_sftp/keys.c
@@ -413,10 +413,15 @@ static int exec_passphrase_provider(server_rec *s, char *buf, int buflen,
if (FD_ISSET(stderr_pipe[0], &readfds)) {
int stderrlen;
- char stderrbuf[PIPE_BUF];
- memset(stderrbuf, '\0', sizeof(stderrbuf));
- stderrlen = read(stderr_pipe[0], stderrbuf, sizeof(stderrbuf)-1);
+ size_t len = fpathconf(stderr_pipe[0], _PC_PIPE_BUF);
+ char *stderrbuf = malloc(len);
+ if (stderrbuf == NULL) {
+ pr_log_pri(PR_LOG_ALERT, MOD_SFTP_VERSION ": Out of memory!");
+ return -1;
+ }
+ memset(stderrbuf, '\0', len);
+ stderrlen = read(stderr_pipe[0], stderrbuf, len - 1);
if (stderrlen > 0) {
while (stderrlen &&
(stderrbuf[stderrlen-1] == '\r' ||
@@ -433,6 +438,7 @@ static int exec_passphrase_provider(server_rec *s, char *buf, int buflen,
": error reading stderr from '%s': %s",
passphrase_provider, strerror(errno));
}
+ free(stderrbuf);
}
}
diff --git a/contrib/mod_tls.c b/contrib/mod_tls.c
index df92658..b094517 100644
--- a/contrib/mod_tls.c
+++ b/contrib/mod_tls.c
@@ -1792,10 +1792,15 @@ static int tls_exec_passphrase_provider(server_rec *s, char *buf, int buflen,
if (FD_ISSET(stderr_pipe[0], &readfds)) {
int stderrlen;
- char stderrbuf[PIPE_BUF];
- memset(stderrbuf, '\0', sizeof(stderrbuf));
- stderrlen = read(stderr_pipe[0], stderrbuf, sizeof(stderrbuf)-1);
+ size_t len = fpathconf(stderr_pipe[0], _PC_PIPE_BUF);
+ char *stderrbuf = malloc(len);
+ if (stderrbuf == NULL) {
+ tls_log("malloc failed: %s", strerror(errno));
+ return -1;
+ }
+ memset(stderrbuf, '\0', len);
+ stderrlen = read(stderr_pipe[0], stderrbuf, len - 1);
if (stderrlen > 0) {
while (stderrlen &&
(stderrbuf[stderrlen-1] == '\r' ||
@@ -1812,6 +1817,7 @@ static int tls_exec_passphrase_provider(server_rec *s, char *buf, int buflen,
": error reading stderr from '%s': %s",
tls_passphrase_provider, strerror(errno));
}
+ free(stderrbuf);
}
}
diff --git a/debian/changelog b/debian/changelog
index 4e14e28..672683e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+proftpd-dfsg (1.3.5a-2) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Fix FTBFS for missing build-indep, Thanks Santiago vila (Closes: #831961).
+ * Fix FTBFS in hurd-i386,thanks Svante Signell (Closes: #745493).
+
+ -- Mahyuddin Susanto <udienz at gmail.com> Wed, 24 Aug 2016 15:23:38 -0700
+
proftpd-dfsg (1.3.5a-1) unstable; urgency=medium
* New upstream release. Patch CVE-2015-3306 merged.
diff --git a/debian/rules b/debian/rules
index 2c6b6a4..4d7482e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -54,6 +54,8 @@ debian/control: debian/control.in
debian/proftpd-substvars: debian/proftpd-substvars.in
sed -e 's/@VERSION@/$(VERSION)/' $< >$@
+build-arch: build
+build-indep: build
build: debian/proftpd-substvars configure-stamp build-stamp
build-stamp:
dh_testdir
@@ -174,3 +176,4 @@ checkroot:
.PHONY: binary binary-arch binary-indep clean checkroot myclean install configure debian/proftpd-substvars debian/control
+.PHONY: build build-arch build-indep
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-proftpd/proftpd-dfsg.git
More information about the Pkg-proftpd-maintainers
mailing list