diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-02-09 10:19:06 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-02-09 10:19:06 -0600 |
commit | 8af5a1ea8e519a20c3c5d49486319b443b4375da (patch) | |
tree | e53ad5153ce3c574394c21b78c76ea0f8a7091e2 /lib | |
parent | 12edb8fb64808ccdca681c3a2f91ca3a8dffee05 (diff) | |
parent | 87ab639764a7d4ff24c9e2ecd1f21536e3b9ceb5 (diff) | |
download | FreeBSD-src-8af5a1ea8e519a20c3c5d49486319b443b4375da.zip FreeBSD-src-8af5a1ea8e519a20c3c5d49486319b443b4375da.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/string/strtok.3 | 7 | ||||
-rw-r--r-- | lib/libpam/modules/pam_ssh/pam_ssh.c | 13 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3 index 97a8b15..9dc36ee 100644 --- a/lib/libc/string/strtok.3 +++ b/lib/libc/string/strtok.3 @@ -44,7 +44,7 @@ .\" @(#)strtok.3 8.2 (Berkeley) 2/3/94 .\" $FreeBSD$ .\" -.Dd November 27, 1998 +.Dd January 22, 2016 .Dt STRTOK 3 .Os .Sh NAME @@ -149,6 +149,11 @@ The function conforms to .St -isoC . +The +.Fn strtok_r +function +conforms to +.St -p1003.1-2001 . .Sh AUTHORS .An Wes Peters , Softweyr LLC: diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.c b/lib/libpam/modules/pam_ssh/pam_ssh.c index 405dd6b..8fc68fd 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.c +++ b/lib/libpam/modules/pam_ssh/pam_ssh.c @@ -321,12 +321,11 @@ pam_ssh_start_agent(pam_handle_t *pamh) static int pam_ssh_add_keys_to_agent(pam_handle_t *pamh) { - AuthenticationConnection *ac; const struct pam_ssh_key *psk; const char **kfn; const void *item; char **envlist, **env; - int pam_err; + int fd, pam_err; /* switch to PAM environment */ envlist = environ; @@ -336,7 +335,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) } /* get a connection to the agent */ - if ((ac = ssh_get_authentication_connection()) == NULL) { + if (ssh_get_authentication_socket(&fd) != 0) { openpam_log(PAM_LOG_DEBUG, "failed to connect to the agent"); pam_err = PAM_SYSTEM_ERR; goto end; @@ -347,7 +346,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) pam_err = pam_get_data(pamh, *kfn, &item); if (pam_err == PAM_SUCCESS && item != NULL) { psk = item; - if (ssh_add_identity(ac, psk->key, psk->comment)) + if (ssh_add_identity(fd, psk->key, psk->comment) == 0) openpam_log(PAM_LOG_DEBUG, "added %s to ssh agent", psk->comment); else @@ -358,11 +357,11 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) } } pam_err = PAM_SUCCESS; - end: + /* disconnect from agent */ - if (ac != NULL) - ssh_close_authentication_connection(ac); + ssh_close_authentication_socket(fd); + end: /* switch back to original environment */ for (env = environ; *env != NULL; ++env) free(*env); |