Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be1da16e49 | ||
|
|
85cf2488d4 | ||
|
|
22bdbc7111 | ||
|
|
7a40c713f9 |
+8
-4
@@ -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
@@ -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)
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user