Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 489098 Details for
Bug 627900
net-libs/libssh: backport fixes that re-enable config file parsing
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
net-libs/libssh: backport fixes that re-enable config file parsing in a (hopefully) sane way.
0001-net-libs-libssh-backport-fixes-that-re-enable-config.patch (text/plain), 3.69 KB, created by
Mihai Moldovan
on 2017-08-15 03:20:54 UTC
(
hide
)
Description:
net-libs/libssh: backport fixes that re-enable config file parsing in a (hopefully) sane way.
Filename:
MIME Type:
Creator:
Mihai Moldovan
Created:
2017-08-15 03:20:54 UTC
Size:
3.69 KB
patch
obsolete
>From 6720fb6b3c4a3b8ffa45a483bb6174904a1a6b3f Mon Sep 17 00:00:00 2001 >From: Mihai Moldovan <ionic@ionic.de> >Date: Tue, 15 Aug 2017 05:13:23 +0200 >Subject: [PATCH 1/2] net-libs/libssh: backport fixes that re-enable config > file parsing in a (hopefully) sane way. > >--- > .../libssh-0.7.5-fix-config-buffer-underflow.patch | 25 +++++++++++++++++ > .../files/libssh-0.7.5-fix-config-parsing.patch | 32 ++++++++++++++++++++++ > ...{libssh-0.7.5.ebuild => libssh-0.7.5-r1.ebuild} | 2 ++ > 3 files changed, 59 insertions(+) > create mode 100644 net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch > create mode 100644 net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch > rename net-libs/libssh/{libssh-0.7.5.ebuild => libssh-0.7.5-r1.ebuild} (96%) > >diff --git a/net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch b/net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch >new file mode 100644 >index 0000000..7ff0326 >--- /dev/null >+++ b/net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch >@@ -0,0 +1,25 @@ >+From 0cffb88b80b1e8b7e292646b955e9b9ca02315c4 Mon Sep 17 00:00:00 2001 >+From: Aris Adamantiadis <aris@0xbadc0de.be> >+Date: Thu, 8 Jun 2017 00:22:02 +0200 >+Subject: config: fix buffer underflow with unrecognized opcodes >+ >+--- >+ src/config.c | 2 +- >+ 1 file changed, 1 insertion(+), 1 deletion(-) >+ >+diff --git a/src/config.c b/src/config.c >+index 519926e7..6187c90f 100644 >+--- a/src/config.c >++++ b/src/config.c >+@@ -218,7 +218,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line, >+ } >+ >+ opcode = ssh_config_get_opcode(keyword); >+- if (*parsing == 1 && opcode != SOC_HOST) { >++ if (*parsing == 1 && opcode != SOC_HOST && opcode != SOC_UNSUPPORTED) { >+ if (seen[opcode] != 0) { >+ return 0; >+ } >+-- >+cgit v1.1 >+ >diff --git a/net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch b/net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch >new file mode 100644 >index 0000000..3596cf0 >--- /dev/null >+++ b/net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch >@@ -0,0 +1,32 @@ >+From 5333be5988c3789e7011598995f4df90d50d84d0 Mon Sep 17 00:00:00 2001 >+From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com> >+Date: Sun, 4 Jun 2017 11:54:55 +0300 >+Subject: config: Bugfix: Don't skip unseen opcodes >+ >+libssh fails to read the configuration from a config file due to a >+wrong check in 'ssh_config_parse_line' procedure in 'config.c'; it's >+effectively skipping every opcode (and therefore every option) from >+the file. The change fixes that behaviour. >+ >+Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com> >+Reviewed-by: Andreas Schneider <asn@cryptomilk.org> >+--- >+ src/config.c | 2 +- >+ 1 file changed, 1 insertion(+), 1 deletion(-) >+ >+diff --git a/src/config.c b/src/config.c >+index 6478fc5f..519926e7 100644 >+--- a/src/config.c >++++ b/src/config.c >+@@ -219,7 +219,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line, >+ >+ opcode = ssh_config_get_opcode(keyword); >+ if (*parsing == 1 && opcode != SOC_HOST) { >+- if (seen[opcode] == 0) { >++ if (seen[opcode] != 0) { >+ return 0; >+ } >+ seen[opcode] = 1; >+-- >+cgit v1.1 >+ >diff --git a/net-libs/libssh/libssh-0.7.5.ebuild b/net-libs/libssh/libssh-0.7.5-r1.ebuild >similarity index 96% >rename from net-libs/libssh/libssh-0.7.5.ebuild >rename to net-libs/libssh/libssh-0.7.5-r1.ebuild >index 8683077..082de3c 100644 >--- a/net-libs/libssh/libssh-0.7.5.ebuild >+++ b/net-libs/libssh/libssh-0.7.5-r1.ebuild >@@ -37,6 +37,8 @@ S="${WORKDIR}/${MY_P}" > > PATCHES=( > "${FILESDIR}"/${PN}-0.5.0-tests.patch >+ "${FILESDIR}"/${P}-fix-config-parsing.patch >+ "${FILESDIR}"/${P}-fix-config-buffer-underflow.patch > ) > > src_prepare() { >-- >2.14.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 627900
: 489098