FreeBSD Bugzilla – Attachment 169261 Details for
Bug 208753
security/openvas-manager: openvasmd startup fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
openvas-manager.patch (text/plain), 5.73 KB, created by
Tijl Coosemans
on 2016-04-12 20:14:59 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2016-04-12 20:14:59 UTC
Size:
5.73 KB
patch
obsolete
>Index: security/openvas-manager/files/patch-src-openvasmd.c >=================================================================== >--- security/openvas-manager/files/patch-src-openvasmd.c (revision 412658) >+++ security/openvas-manager/files/patch-src-openvasmd.c (working copy) >@@ -36,7 +36,38 @@ > exit (EXIT_FAILURE); > } > >-@@ -1468,25 +1468,25 @@ main (int argc, char** argv) >+@@ -1148,6 +1148,7 @@ manager_listen (const char *address_str, >+ struct sockaddr_storage address; >+ struct sockaddr_in *addr4 = (struct sockaddr_in *) &address; >+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) &address; >++ socklen_t addrlen; >+ int port, optval; >+ >+ if (!address_str) >+@@ -1176,11 +1177,13 @@ manager_listen (const char *address_str, >+ { >+ address.ss_family = AF_INET6; >+ addr6->sin6_port = port; >++ addrlen = sizeof (*addr6); >+ } >+ else if (inet_pton (AF_INET, address_str, &addr4->sin_addr) > 0) >+ { >+ address.ss_family = AF_INET; >+ addr4->sin_port = port; >++ addrlen = sizeof (*addr4); >+ } >+ else >+ { >+@@ -1211,7 +1214,7 @@ manager_listen (const char *address_str, >+ return -1; >+ } >+ >+- if (bind (*soc, (struct sockaddr *) &address, sizeof (address)) >++ if (bind (*soc, (struct sockaddr *) &address, addrlen) >+ == -1) >+ { >+ g_warning ("Failed to bind manager socket: %s", strerror (errno)); >+@@ -1468,25 +1471,25 @@ main (int argc, char** argv) > switch (manage_optimize (log_config, database, optimize)) > { > case 0: >@@ -67,7 +98,7 @@ > return EXIT_FAILURE; > } > return EXIT_SUCCESS; >-@@ -1524,7 +1524,7 @@ main (int argc, char** argv) >+@@ -1524,7 +1527,7 @@ main (int argc, char** argv) > scanner_ca_pub, scanner_key_pub, > scanner_key_priv); > g_free (stype); >@@ -76,7 +107,7 @@ > switch (ret) > { > case 0: >-@@ -1576,7 +1576,7 @@ main (int argc, char** argv) >+@@ -1576,7 +1579,7 @@ main (int argc, char** argv) > stype, scanner_ca_pub, scanner_key_pub, > scanner_key_priv); > g_free (stype); >@@ -85,7 +116,7 @@ > switch (ret) > { > case 0: >-@@ -1606,22 +1606,22 @@ main (int argc, char** argv) >+@@ -1606,22 +1609,22 @@ main (int argc, char** argv) > switch (manage_create_user (log_config, database, create_user, role)) > { > case 0: >@@ -112,7 +143,7 @@ > return EXIT_FAILURE; > } > return EXIT_SUCCESS; >-@@ -1635,32 +1635,32 @@ main (int argc, char** argv) >+@@ -1635,32 +1638,32 @@ main (int argc, char** argv) > switch (manage_delete_user (log_config, database, delete_user)) > { > case 0: >@@ -151,7 +182,7 @@ > return EXIT_FAILURE; > } > } >-@@ -1671,22 +1671,22 @@ main (int argc, char** argv) >+@@ -1671,22 +1674,22 @@ main (int argc, char** argv) > switch (manage_get_users (log_config, database, role)) > { > case 0: >@@ -178,7 +209,7 @@ > return EXIT_FAILURE; > } > } >-@@ -1695,7 +1695,7 @@ main (int argc, char** argv) >+@@ -1695,7 +1698,7 @@ main (int argc, char** argv) > { > /* List the users and then exit. */ > int ret = manage_get_scanners (log_config, database); >@@ -187,7 +218,7 @@ > switch (ret) > { > case 0: >-@@ -1720,7 +1720,7 @@ main (int argc, char** argv) >+@@ -1720,7 +1723,7 @@ main (int argc, char** argv) > > /* Delete the scanner and then exit. */ > ret = manage_delete_scanner (log_config, database, delete_scanner); >@@ -196,7 +227,7 @@ > switch (ret) > { > case 0: >-@@ -1748,7 +1748,7 @@ main (int argc, char** argv) >+@@ -1748,7 +1751,7 @@ main (int argc, char** argv) > > /* Delete the scanner and then exit. */ > ret = manage_verify_scanner (log_config, database, verify_scanner); >@@ -205,7 +236,7 @@ > switch (ret) > { > case 0: >-@@ -1783,26 +1783,26 @@ main (int argc, char** argv) >+@@ -1783,26 +1786,26 @@ main (int argc, char** argv) > switch (manage_set_password (log_config, database, user, new_password)) > { > case 0: >@@ -237,7 +268,7 @@ > return EXIT_FAILURE; > } > } >-@@ -1885,24 +1885,24 @@ main (int argc, char** argv) >+@@ -1885,24 +1888,24 @@ main (int argc, char** argv) > case -2: > g_critical ("%s: database is wrong version\n", __FUNCTION__); > fprintf (stderr, "Decryption failed.\n"); >@@ -266,7 +297,7 @@ > return EXIT_SUCCESS; > } > >-@@ -1916,24 +1916,24 @@ main (int argc, char** argv) >+@@ -1916,24 +1919,24 @@ main (int argc, char** argv) > case -2: > g_critical ("%s: database is wrong version\n", __FUNCTION__); > fprintf (stderr, "Decryption failed.\n"); >@@ -295,7 +326,7 @@ > return EXIT_SUCCESS; > } > >-@@ -2005,12 +2005,12 @@ main (int argc, char** argv) >+@@ -2005,12 +2008,12 @@ main (int argc, char** argv) > g_critical ("%s: failed to fork into background: %s\n", > __FUNCTION__, > strerror (errno)); >@@ -310,7 +341,7 @@ > exit (EXIT_SUCCESS); > break; > } >-@@ -2026,25 +2026,25 @@ main (int argc, char** argv) >+@@ -2026,25 +2029,25 @@ main (int argc, char** argv) > break; > case -2: > g_critical ("%s: database is wrong version\n", __FUNCTION__); >@@ -340,7 +371,7 @@ > exit (EXIT_FAILURE); > } > >-@@ -2054,7 +2054,7 @@ main (int argc, char** argv) >+@@ -2054,7 +2057,7 @@ main (int argc, char** argv) > { > g_critical ("%s: failed to register `atexit' cleanup function\n", > __FUNCTION__);
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 208753
: 169261