Compare commits

...
4 Commits
Author SHA1 Message Date
[email protected] be1da16e49 upstream: process agent requests for RSA certificate private keys using
correct signature algorithm when requested. Patch from Jakub Jelen in bz3016
ok dtucker markus

OpenBSD-Commit-ID: 61f86efbeb4a1857a3e91298c1ccc6cf49b79624
2019-06-14 13:54:31 +10:00
[email protected] 85cf2488d4 upstream: embiggen format buffer size for certificate serial number so
that it will fit a full 64 bit integer. bz#3012 from Manoel Domingues Junior

OpenBSD-Commit-ID: a51f3013056d05b976e5af6b978dcb9e27bbc12b
2019-05-20 10:28:21 +10:00
Darren Tucker 22bdbc7111 Add no-op implementation of pam_putenv.
Some platforms such as HP-UX do not have pam_putenv.  Currently the
calls are ifdef'ed out, but a new one was recently added.  Remove the
ifdefs and add a no-op implementation.  bz#3008, ok djm.
2019-05-17 13:22:26 +10:00
Darren Tucker 7a40c713f9 Don't install duplicate STREAMS modules on Solaris
Check if STREAMS modules are already installed on pty before installing
since when compiling with XPG>=4 they will likely be installed already.
Prevents hangs and duplicate lines on the terminal.  bz#2945 and bz#2998,
patch from djm@
2019-04-26 18:16:41 +10:00
4 changed files with 24 additions and 6 deletions
+8 -4
View File
@@ -266,6 +266,14 @@ pam_getenvlist(pam_handle_t *pamh)
}
#endif
#ifndef HAVE_PAM_PUTENV
static int
pam_putenv(pam_handle_t *pamh, const char *name_value)
{
return PAM_SUCCESS;
}
#endif /* HAVE_PAM_PUTENV */
/*
* Some platforms, notably Solaris, do not enforce password complexity
* rules during pam_chauthtok() if the real uid of the calling process
@@ -360,13 +368,11 @@ import_environments(struct sshbuf *b)
for (i = 0; i < num_env; i++) {
if ((r = sshbuf_get_cstring(b, &env, NULL)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
#ifdef HAVE_PAM_PUTENV
/* Errors are not fatal here */
if ((r = pam_putenv(sshpam_handle, env)) != PAM_SUCCESS) {
error("PAM: pam_putenv: %s",
pam_strerror(sshpam_handle, r));
}
#endif
/* XXX leak env? */
}
#endif
@@ -1205,7 +1211,6 @@ int
do_pam_putenv(char *name, char *value)
{
int ret = 1;
#ifdef HAVE_PAM_PUTENV
char *compound;
size_t len;
@@ -1215,7 +1220,6 @@ do_pam_putenv(char *name, char *value)
snprintf(compound, len, "%s=%s", name, value);
ret = pam_putenv(sshpam_handle, compound);
free(compound);
#endif
return (ret);
}
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2-pubkey.c,v 1.87 2019/01/22 11:26:16 djm Exp $ */
/* $OpenBSD: auth2-pubkey.c,v 1.88 2019/05/20 00:25:55 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -418,7 +418,7 @@ match_principals_command(struct ssh *ssh, struct passwd *user_pw,
pid_t pid;
char *tmp, *username = NULL, *command = NULL, **av = NULL;
char *ca_fp = NULL, *key_fp = NULL, *catext = NULL, *keytext = NULL;
char serial_s[16], uidstr[32];
char serial_s[32], uidstr[32];
void (*osigchld)(int);
if (authoptsp != NULL)
+9
View File
@@ -121,6 +121,15 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
return (-1);
}
# if defined(I_FIND) && defined(__SVR4)
/*
* If the streams modules have already been pushed then there
* is no more work to do here.
*/
if (ioctl(*aslave, I_FIND, "ptem") != 0)
return 0;
# endif
/*
* Try to push the appropriate streams modules, as described
* in Solaris pts(7).
+5
View File
@@ -269,6 +269,11 @@ agent_decode_alg(struct sshkey *key, u_int flags)
return "rsa-sha2-256";
else if (flags & SSH_AGENT_RSA_SHA2_512)
return "rsa-sha2-512";
} else if (key->type == KEY_RSA_CERT) {
if (flags & SSH_AGENT_RSA_SHA2_256)
return "[email protected]";
else if (flags & SSH_AGENT_RSA_SHA2_512)
return "[email protected]";
}
return NULL;
}