SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
35
security/libssh2/patches/patch-example_subsystem_netconf_c
Normal file
35
security/libssh2/patches/patch-example_subsystem_netconf_c
Normal file
|
@ -0,0 +1,35 @@
|
|||
Index: example/subsystem_netconf.c
|
||||
--- example/subsystem_netconf.c.orig
|
||||
+++ example/subsystem_netconf.c
|
||||
@@ -257,14 +257,14 @@ int main(int argc, char *argv[])
|
||||
/* NETCONF: https://tools.ietf.org/html/draft-ietf-netconf-ssh-06 */
|
||||
|
||||
fprintf(stderr, "Sending NETCONF client <hello>\n");
|
||||
- snprintf(buf, sizeof(buf),
|
||||
+ len = snprintf(buf, sizeof(buf),
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
"<hello>"
|
||||
"<capabilities>"
|
||||
"<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>"
|
||||
"</capabilities>"
|
||||
"</hello>\n"
|
||||
- "]]>]]>\n%n", (int *)&len);
|
||||
+ "]]>]]>\n");
|
||||
if(-1 == netconf_write(channel, buf, len))
|
||||
goto shutdown;
|
||||
|
||||
@@ -277,12 +277,12 @@ int main(int argc, char *argv[])
|
||||
(int)len, buf);
|
||||
|
||||
fprintf(stderr, "Sending NETCONF <rpc>\n");
|
||||
- snprintf(buf, sizeof(buf),
|
||||
+ len = snprintf(buf, sizeof(buf),
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
"<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">"
|
||||
"<get-interface-information><terse/></get-interface-information>"
|
||||
"</rpc>\n"
|
||||
- "]]>]]>\n%n", (int *)&len);
|
||||
+ "]]>]]>\n");
|
||||
if(-1 == netconf_write(channel, buf, len))
|
||||
goto shutdown;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue