mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 04:40:31 +09:00
Compare commits
9 Commits
release-0-
...
release-0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6a7922dbd | ||
|
|
608e81bc00 | ||
|
|
7e17838c0b | ||
|
|
84f6945a9c | ||
|
|
3ae187dbe7 | ||
|
|
26989ab001 | ||
|
|
5b2e39cd79 | ||
|
|
13af149ef9 | ||
|
|
3453cafd95 |
@@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
|
||||
|
||||
set(APPLICATION_VERSION_MAJOR "0")
|
||||
set(APPLICATION_VERSION_MINOR "4")
|
||||
set(APPLICATION_VERSION_PATCH "3")
|
||||
set(APPLICATION_VERSION_PATCH "4")
|
||||
|
||||
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
|
||||
|
||||
@@ -19,7 +19,7 @@ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO
|
||||
# Increment AGE. Set REVISION to 0
|
||||
# If the source code was changed, but there were no interface changes:
|
||||
# Increment REVISION.
|
||||
set(LIBRARY_VERSION "4.1.0")
|
||||
set(LIBRARY_VERSION "4.1.1")
|
||||
set(LIBRARY_SOVERSION "4")
|
||||
|
||||
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
||||
|
||||
@@ -13,7 +13,7 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
|
||||
### versions
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "4")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "3")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "4")
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
ChangeLog
|
||||
==========
|
||||
|
||||
version 0.4.4 (released 2010-06-01)
|
||||
* Fixed a bug in the expand function for escape sequences.
|
||||
* Fixed a bug in the tilde expand function.
|
||||
* Fixed a bug in setting the options.
|
||||
|
||||
version 0.4.3 (released 2010-05-18)
|
||||
* Added global/keepalive responses.
|
||||
* Added runtime detection of WSAPoll().
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
/* libssh version */
|
||||
#define LIBSSH_VERSION_MAJOR 0
|
||||
#define LIBSSH_VERSION_MINOR 4
|
||||
#define LIBSSH_VERSION_MICRO 3
|
||||
#define LIBSSH_VERSION_MICRO 4
|
||||
|
||||
#define LIBSSH_VERSION_INT SSH_VERSION_INT(LIBSSH_VERSION_MAJOR, \
|
||||
LIBSSH_VERSION_MINOR, \
|
||||
|
||||
@@ -225,7 +225,7 @@ int ssh_userauth_none(ssh_session session, const char *username) {
|
||||
|
||||
if (username == NULL) {
|
||||
if (session->username == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
leave_function();
|
||||
return rc;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ int ssh_userauth_offer_pubkey(ssh_session session, const char *username,
|
||||
|
||||
if (username == NULL) {
|
||||
if (session->username == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
leave_function();
|
||||
return rc;
|
||||
}
|
||||
@@ -443,7 +443,7 @@ int ssh_userauth_pubkey(ssh_session session, const char *username,
|
||||
|
||||
if (username == NULL) {
|
||||
if (session->username == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
leave_function();
|
||||
return rc;
|
||||
}
|
||||
@@ -561,7 +561,7 @@ int ssh_userauth_agent_pubkey(ssh_session session, const char *username,
|
||||
|
||||
if (username == NULL) {
|
||||
if (session->username == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
leave_function();
|
||||
return rc;
|
||||
}
|
||||
@@ -688,7 +688,7 @@ int ssh_userauth_password(ssh_session session, const char *username,
|
||||
|
||||
if (username == NULL) {
|
||||
if (session->username == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
leave_function();
|
||||
return rc;
|
||||
}
|
||||
@@ -777,7 +777,6 @@ error:
|
||||
*
|
||||
* @see ssh_userauth_kbdint()
|
||||
* @see ssh_userauth_password()
|
||||
* @see ssh_options_set()
|
||||
*/
|
||||
int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
|
||||
struct ssh_iterator *it;
|
||||
@@ -1336,7 +1335,7 @@ int ssh_userauth_kbdint(ssh_session session, const char *user,
|
||||
/* first time we call. we must ask for a challenge */
|
||||
if (user == NULL) {
|
||||
if ((user = session->username) == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
leave_function();
|
||||
return SSH_AUTH_ERROR;
|
||||
} else {
|
||||
|
||||
@@ -1077,7 +1077,7 @@ int ssh_try_publickey_from_file(ssh_session session, const char *keyfile,
|
||||
}
|
||||
|
||||
if (session->sshdir == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_SSH_DIR, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -1145,7 +1145,7 @@ ssh_string try_publickey_from_file(ssh_session session, struct ssh_keys_struct k
|
||||
}
|
||||
|
||||
if (session->sshdir == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_SSH_DIR, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1550,7 +1550,6 @@ static int match_hashed_host(ssh_session session, const char *host,
|
||||
* if host key is accepted\n
|
||||
* SSH_SERVER_ERROR: Some error happened
|
||||
*
|
||||
* \see ssh_options_set()
|
||||
* \see ssh_get_pubkey_hash()
|
||||
*
|
||||
* \bug There is no current way to remove or modify an entry into the known
|
||||
@@ -1568,7 +1567,7 @@ int ssh_is_server_known(ssh_session session) {
|
||||
enter_function();
|
||||
|
||||
if (session->knownhosts == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||
"Can't find a known_hosts file");
|
||||
leave_function();
|
||||
@@ -1687,7 +1686,7 @@ int ssh_write_knownhost(ssh_session session) {
|
||||
}
|
||||
|
||||
if (session->knownhosts == NULL) {
|
||||
if (ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, NULL) < 0) {
|
||||
if (ssh_options_apply(session) < 0) {
|
||||
ssh_set_error(session, SSH_FATAL, "Can't find a known_hosts file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ char *ssh_path_expand_tilde(const char *d) {
|
||||
if (lh > 0) {
|
||||
memcpy(r, h, lh);
|
||||
}
|
||||
memcpy(r + lh, p, ld);
|
||||
memcpy(r + lh, p, ld + 1);
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -634,6 +634,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
|
||||
}
|
||||
l = strlen(buf);
|
||||
strcat(buf + l, x);
|
||||
buf[i] = '\0';
|
||||
SAFE_FREE(x);
|
||||
}
|
||||
|
||||
|
||||
@@ -1058,6 +1058,13 @@ int ssh_options_apply(ssh_session session) {
|
||||
}
|
||||
}
|
||||
|
||||
if (session->username == NULL) {
|
||||
rc = ssh_options_set(session, SSH_OPTIONS_USER, NULL);
|
||||
if (rc < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (session->knownhosts == NULL) {
|
||||
tmp = ssh_path_expand_escape(session, "%d/known_hosts");
|
||||
} else {
|
||||
|
||||
@@ -104,7 +104,7 @@ ssh_session ssh_new(void) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
id = strdup("SSH_DIR/id_rsa");
|
||||
id = strdup("%d/id_rsa");
|
||||
if (id == NULL) {
|
||||
goto err;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ ssh_session ssh_new(void) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
id = strdup("SSH_DIR/id_dsa");
|
||||
id = strdup("%d/id_dsa");
|
||||
if (id == NULL) {
|
||||
goto err;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ ssh_session ssh_new(void) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
id = strdup("SSH_DIR/identity");
|
||||
id = strdup("%d/identity");
|
||||
if (id == NULL) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user