Since there aren't packages for OpenVAS 7 yet, I decided to just build it
from source.  However, the first compilation is failing with all sorts of
ssh-related errors.  This is on an up-to-date Ubuntu 14.04 box.  Anyone
have any ideas?


------

cd openvas-libraries-7.0.1/
mkdir build
cd build
cmake ..
make

------

...
[ 42%] Building C object
nasl/CMakeFiles/openvas_nasl_shared.dir/nasl_ssh.c.o
In file included from /root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:58:0:
/usr/include/libssh/legacy.h:34:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_auth_list(ssh_session session);
            ^
/usr/include/libssh/legacy.h:35:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_userauth_offer_pubkey(ssh_session session, const char
*username, int type, ssh_string publickey);
            ^
/usr/include/libssh/legacy.h:36:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_userauth_pubkey(ssh_session session, const char
*username, ssh_string publickey, ssh_private_key privatekey);
            ^
In file included from /root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:58:0:
/usr/include/libssh/legacy.h:38:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_userauth_agent_pubkey(ssh_session session, const char
*username,
            ^
/usr/include/libssh/legacy.h:41:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_userauth_autopubkey(ssh_session session, const char
*passphrase);
            ^
/usr/include/libssh/legacy.h:42:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_userauth_privatekey_file(ssh_session session, const
char *username,
            ^
/usr/include/libssh/legacy.h:45:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
 LIBSSH_API void buffer_free(ssh_buffer buffer);
            ^
/usr/include/libssh/legacy.h:46:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
 LIBSSH_API void *buffer_get(ssh_buffer buffer);
            ^
/usr/include/libssh/legacy.h:47:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API uint32_t buffer_get_len(ssh_buffer buffer);
 ^
/usr/include/libssh/legacy.h:47:21: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'buffer_get_len'
 LIBSSH_API uint32_t buffer_get_len(ssh_buffer buffer);
                     ^
/usr/include/libssh/legacy.h:48:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_buffer buffer_new(void);
 ^
/usr/include/libssh/legacy.h:48:23: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'buffer_new'
 LIBSSH_API ssh_buffer buffer_new(void);
                       ^
/usr/include/libssh/legacy.h:50:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_channel channel_accept_x11(ssh_channel channel, int
timeout_ms);
 ^
/usr/include/libssh/legacy.h:50:24: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'channel_accept_x11'
 LIBSSH_API ssh_channel channel_accept_x11(ssh_channel channel, int
timeout_ms);
                        ^
/usr/include/libssh/legacy.h:51:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_change_pty_size(ssh_channel channel,int cols,int
rows);
            ^
/usr/include/libssh/legacy.h:52:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_channel channel_forward_accept(ssh_session session, int
timeout_ms);
 ^
/usr/include/libssh/legacy.h:52:24: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'channel_forward_accept'
 LIBSSH_API ssh_channel channel_forward_accept(ssh_session session, int
timeout_ms);
                        ^
/usr/include/libssh/legacy.h:53:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_close(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:54:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_forward_cancel(ssh_session session, const char
*address, int port);
            ^
/usr/include/libssh/legacy.h:55:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_forward_listen(ssh_session session, const char
*address, int port, int *bound_port);
            ^
/usr/include/libssh/legacy.h:56:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
 LIBSSH_API void channel_free(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:57:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_get_exit_status(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:58:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_session channel_get_session(ssh_channel channel);
 ^
/usr/include/libssh/legacy.h:58:24: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'channel_get_session'
 LIBSSH_API ssh_session channel_get_session(ssh_channel channel);
                        ^
/usr/include/libssh/legacy.h:59:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_is_closed(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:60:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_is_eof(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:61:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_is_open(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:62:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_channel channel_new(ssh_session session);
 ^
/usr/include/libssh/legacy.h:62:24: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'channel_new'
 LIBSSH_API ssh_channel channel_new(ssh_session session);
                        ^
/usr/include/libssh/legacy.h:63:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_open_forward(ssh_channel channel, const char
*remotehost,
            ^
/usr/include/libssh/legacy.h:65:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_open_session(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:66:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_poll(ssh_channel channel, int is_stderr);
            ^
/usr/include/libssh/legacy.h:67:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_read(ssh_channel channel, void *dest, uint32_t
count, int is_stderr);
            ^
/usr/include/libssh/legacy.h:69:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_read_buffer(ssh_channel channel, ssh_buffer buffer,
uint32_t count,
            ^
/usr/include/libssh/legacy.h:72:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_read_nonblocking(ssh_channel channel, void *dest,
uint32_t count,
            ^
/usr/include/libssh/legacy.h:74:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_env(ssh_channel channel, const char *name,
const char *value);
            ^
/usr/include/libssh/legacy.h:75:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_exec(ssh_channel channel, const char *cmd);
            ^
/usr/include/libssh/legacy.h:76:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_pty(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:77:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_pty_size(ssh_channel channel, const char
*term,
            ^
/usr/include/libssh/legacy.h:79:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_shell(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:80:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_send_signal(ssh_channel channel, const char
*signum);
            ^
/usr/include/libssh/legacy.h:81:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_sftp(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:82:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_subsystem(ssh_channel channel, const char
*subsystem);
            ^
/usr/include/libssh/legacy.h:83:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_request_x11(ssh_channel channel, int
single_connection, const char *protocol,
            ^
/usr/include/libssh/legacy.h:85:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_send_eof(ssh_channel channel);
            ^
/usr/include/libssh/legacy.h:86:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_select(ssh_channel *readchans, ssh_channel
*writechans, ssh_channel *exceptchans, struct
            ^
/usr/include/libssh/legacy.h:88:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
 LIBSSH_API void channel_set_blocking(ssh_channel channel, int blocking);
            ^
/usr/include/libssh/legacy.h:89:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int channel_write(ssh_channel channel, const void *data,
uint32_t len);
            ^
/usr/include/libssh/legacy.h:91:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
 LIBSSH_API void privatekey_free(ssh_private_key prv);
            ^
/usr/include/libssh/legacy.h:92:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_private_key privatekey_from_file(ssh_session session, const
char *filename,
 ^
/usr/include/libssh/legacy.h:92:28: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'privatekey_from_file'
 LIBSSH_API ssh_private_key privatekey_from_file(ssh_session session, const
char *filename,
                            ^
/usr/include/libssh/legacy.h:94:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
 LIBSSH_API void publickey_free(ssh_public_key key);
            ^
/usr/include/libssh/legacy.h:95:12: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'int'
 LIBSSH_API int ssh_publickey_to_file(ssh_session session, const char *file,
            ^
/usr/include/libssh/legacy.h:97:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_string publickey_from_file(ssh_session session, const char
*filename,
 ^
/usr/include/libssh/legacy.h:97:23: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'publickey_from_file'
 LIBSSH_API ssh_string publickey_from_file(ssh_session session, const char
*filename,
                       ^
/usr/include/libssh/legacy.h:99:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_public_key publickey_from_privatekey(ssh_private_key prv);
 ^
/usr/include/libssh/legacy.h:99:27: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'publickey_from_privatekey'
 LIBSSH_API ssh_public_key publickey_from_privatekey(ssh_private_key prv);
                           ^
/usr/include/libssh/legacy.h:100:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_string publickey_to_string(ssh_public_key key);
 ^
/usr/include/libssh/legacy.h:100:23: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'publickey_to_string'
 LIBSSH_API ssh_string publickey_to_string(ssh_public_key key);
                       ^
/usr/include/libssh/legacy.h:101:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'int'
 LIBSSH_API int ssh_try_publickey_from_file(ssh_session session, const char
*keyfile,
            ^
/usr/include/libssh/legacy.h:103:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'enum'
 LIBSSH_API enum ssh_keytypes_e ssh_privatekey_type(ssh_private_key
privatekey);
            ^
/usr/include/libssh/legacy.h:105:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_string ssh_get_pubkey(ssh_session session);
 ^
/usr/include/libssh/legacy.h:105:23: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'ssh_get_pubkey'
 LIBSSH_API ssh_string ssh_get_pubkey(ssh_session session);
                       ^
/usr/include/libssh/legacy.h:107:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_message ssh_message_retrieve(ssh_session session, uint32_t
packettype);
 ^
/usr/include/libssh/legacy.h:107:24: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'ssh_message_retrieve'
 LIBSSH_API ssh_message ssh_message_retrieve(ssh_session session, uint32_t
packettype);
                        ^
/usr/include/libssh/legacy.h:108:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg);
 ^
/usr/include/libssh/legacy.h:108:27: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'ssh_message_auth_publickey'
 LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg);
                           ^
/usr/include/libssh/legacy.h:110:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'void'
 LIBSSH_API void string_burn(ssh_string str);
            ^
/usr/include/libssh/legacy.h:111:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_string string_copy(ssh_string str);
 ^
/usr/include/libssh/legacy.h:111:23: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'string_copy'
 LIBSSH_API ssh_string string_copy(ssh_string str);
                       ^
/usr/include/libssh/legacy.h:112:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'void'
 LIBSSH_API void *string_data(ssh_string str);
            ^
/usr/include/libssh/legacy.h:113:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'int'
 LIBSSH_API int string_fill(ssh_string str, const void *data, size_t len);
            ^
/usr/include/libssh/legacy.h:114:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'void'
 LIBSSH_API void string_free(ssh_string str);
            ^
/usr/include/libssh/legacy.h:115:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_string string_from_char(const char *what);
 ^
/usr/include/libssh/legacy.h:115:23: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'string_from_char'
 LIBSSH_API ssh_string string_from_char(const char *what);
                       ^
/usr/include/libssh/legacy.h:116:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API size_t string_len(ssh_string str);
 ^
/usr/include/libssh/legacy.h:116:19: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'string_len'
 LIBSSH_API size_t string_len(ssh_string str);
                   ^
/usr/include/libssh/legacy.h:117:1: error: unknown type name 'LIBSSH_API'
 LIBSSH_API ssh_string string_new(size_t size);
 ^
/usr/include/libssh/legacy.h:117:23: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'string_new'
 LIBSSH_API ssh_string string_new(size_t size);
                       ^
/usr/include/libssh/legacy.h:118:12: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'char'
 LIBSSH_API char *string_to_char(ssh_string str);
            ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c: In function
'my_ssh_key_free':
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:257:3: error: implicit
declaration of function 'privatekey_free'
[-Werror=implicit-function-declaration]
   privatekey_free (key->privkey);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c: In function
'my_ssh_pki_import_privkey_base64':
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:598:3: error: implicit
declaration of function 'privatekey_from_file'
[-Werror=implicit-function-declaration]
   ssh_privkey = privatekey_from_file (session, privkey_filename, 0,
passphrase);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:598:15: error: assignment
makes pointer from integer without a cast [-Werror]
   ssh_privkey = privatekey_from_file (session, privkey_filename, 0,
passphrase);
               ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:637:3: error: implicit
declaration of function 'ssh_privatekey_type'
[-Werror=implicit-function-declaration]
   pkey->type = ssh_privatekey_type (ssh_privkey);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:647:3: error: implicit
declaration of function 'publickey_from_privatekey'
[-Werror=implicit-function-declaration]
   ssh_pubkey = publickey_from_privatekey (ssh_privkey);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:647:14: error: assignment
makes pointer from integer without a cast [-Werror]
   ssh_pubkey = publickey_from_privatekey (ssh_privkey);
              ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:656:3: error: implicit
declaration of function 'publickey_to_string'
[-Werror=implicit-function-declaration]
   pkey->pubkey_string = publickey_to_string (ssh_pubkey);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:656:23: error: assignment
makes pointer from integer without a cast [-Werror]
   pkey->pubkey_string = publickey_to_string (ssh_pubkey);
                       ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:657:3: error: implicit
declaration of function 'publickey_free'
[-Werror=implicit-function-declaration]
   publickey_free (ssh_pubkey);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c: In function
'my_ssh_userauth_try_publickey':
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:706:3: error: implicit
declaration of function 'ssh_userauth_offer_pubkey'
[-Werror=implicit-function-declaration]
   rc = ssh_userauth_offer_pubkey (session, NULL, key->type,
key->pubkey_string);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c: In function
'my_ssh_userauth_publickey':
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:741:3: error: implicit
declaration of function 'ssh_userauth_pubkey'
[-Werror=implicit-function-declaration]
   rc = ssh_userauth_pubkey (session, NULL, key->pubkey_string,
key->privkey);
   ^
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c: In function
'nasl_ssh_get_server_banner':
/root/openvas-libraries-7.0.1/nasl/nasl_ssh.c:1864:10: error: assignment
discards 'const' qualifier from pointer target type [-Werror]
   banner = ssh_get_serverbanner (session);
          ^
cc1: all warnings being treated as errors
make[2]: *** [nasl/CMakeFiles/openvas_nasl_shared.dir/nasl_ssh.c.o] Error 1
make[1]: *** [nasl/CMakeFiles/openvas_nasl_shared.dir/all] Error 2
make: *** [all] Error 2
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to