|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/auth2-pubkey.c.pka openssh-5.4p1/auth2-pubkey.c
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/auth2-pubkey.c.pka 2010-03-09 08:01:05.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/auth2-pubkey.c 2010-03-09 08:07:15.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
@@ -187,27 +187,15 @@ done:
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
/* return 1 if user allows given key */
|
|
Jan F. Chadima |
201f4a |
static int
|
|
Jan F. Chadima |
201f4a |
-user_key_allowed2(struct passwd *pw, Key *key, char *file)
|
|
Jan F. Chadima |
201f4a |
+user_search_key_in_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|
Jan F. Chadima |
201f4a |
{
|
|
Jan F. Chadima |
201f4a |
char line[SSH_MAX_PUBKEY_BYTES];
|
|
Jan F. Chadima |
974c89 |
const char *reason;
|
|
Jan F. Chadima |
201f4a |
int found_key = 0;
|
|
Jan F. Chadima |
201f4a |
- FILE *f;
|
|
Jan F. Chadima |
201f4a |
u_long linenum = 0;
|
|
Jan F. Chadima |
201f4a |
Key *found;
|
|
Jan F. Chadima |
201f4a |
char *fp;
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
- /* Temporarily use the user's uid. */
|
|
Jan F. Chadima |
201f4a |
- temporarily_use_uid(pw);
|
|
Jan F. Chadima |
201f4a |
-
|
|
Jan F. Chadima |
201f4a |
- debug("trying public key file %s", file);
|
|
Jan F. Chadima |
201f4a |
- f = auth_openkeyfile(file, pw, options.strict_modes);
|
|
Jan F. Chadima |
201f4a |
-
|
|
Jan F. Chadima |
201f4a |
- if (!f) {
|
|
Jan F. Chadima |
201f4a |
- restore_uid();
|
|
Jan F. Chadima |
201f4a |
- return 0;
|
|
Jan F. Chadima |
201f4a |
- }
|
|
Jan F. Chadima |
201f4a |
-
|
|
Jan F. Chadima |
201f4a |
found_key = 0;
|
|
Jan F. Chadima |
974c89 |
found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
ef5d19 |
@@ -278,8 +266,6 @@ user_key_allowed2(struct passwd *pw, Key
|
|
Jan F. Chadima |
201f4a |
break;
|
|
Jan F. Chadima |
201f4a |
}
|
|
Jan F. Chadima |
201f4a |
}
|
|
Jan F. Chadima |
201f4a |
- restore_uid();
|
|
Jan F. Chadima |
201f4a |
- fclose(f);
|
|
Jan F. Chadima |
201f4a |
key_free(found);
|
|
Jan F. Chadima |
201f4a |
if (!found_key)
|
|
Jan F. Chadima |
201f4a |
debug2("key not found");
|
|
Jan F. Chadima |
ef5d19 |
@@ -327,13 +313,153 @@ user_cert_trusted_ca(struct passwd *pw,
|
|
Jan F. Chadima |
ef5d19 |
return ret;
|
|
Jan F. Chadima |
201f4a |
}
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
-/* check whether given key is in .ssh/authorized_keys* */
|
|
Jan F. Chadima |
201f4a |
+/* return 1 if user allows given key */
|
|
Jan F. Chadima |
201f4a |
+static int
|
|
Jan F. Chadima |
201f4a |
+user_key_allowed2(struct passwd *pw, Key *key, char *file)
|
|
Jan F. Chadima |
201f4a |
+{
|
|
Jan F. Chadima |
201f4a |
+ FILE *f;
|
|
Jan F. Chadima |
201f4a |
+ int found_key = 0;
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ /* Temporarily use the user's uid. */
|
|
Jan F. Chadima |
201f4a |
+ temporarily_use_uid(pw);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ debug("trying public key file %s", file);
|
|
Jan F. Chadima |
201f4a |
+ f = auth_openkeyfile(file, pw, options.strict_modes);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (f) {
|
|
Jan F. Chadima |
201f4a |
+ found_key = user_search_key_in_file (f, file, key, pw);
|
|
Jan F. Chadima |
201f4a |
+ fclose(f);
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ restore_uid();
|
|
Jan F. Chadima |
201f4a |
+ return found_key;
|
|
Jan F. Chadima |
201f4a |
+}
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+#ifdef WITH_PUBKEY_AGENT
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+#define WHITESPACE " \t\r\n"
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+/* return 1 if user allows given key */
|
|
Jan F. Chadima |
201f4a |
+static int
|
|
Jan F. Chadima |
201f4a |
+user_key_via_agent_allowed2(struct passwd *pw, Key *key)
|
|
Jan F. Chadima |
201f4a |
+{
|
|
Jan F. Chadima |
201f4a |
+ FILE *f;
|
|
Jan F. Chadima |
201f4a |
+ int found_key = 0;
|
|
Jan F. Chadima |
201f4a |
+ char *pubkey_agent_string = NULL;
|
|
Jan F. Chadima |
201f4a |
+ char *tmp_pubkey_agent_string = NULL;
|
|
Jan F. Chadima |
201f4a |
+ char *progname;
|
|
Jan F. Chadima |
201f4a |
+ char *cp;
|
|
Jan F. Chadima |
201f4a |
+ struct passwd *runas_pw;
|
|
Jan F. Chadima |
201f4a |
+ struct stat st;
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (options.pubkey_agent == NULL || options.pubkey_agent[0] != '/')
|
|
Jan F. Chadima |
201f4a |
+ return -1;
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ /* get the run as identity from config */
|
|
Jan F. Chadima |
201f4a |
+ runas_pw = (options.pubkey_agent_runas == NULL)? pw
|
|
Jan F. Chadima |
201f4a |
+ : getpwnam (options.pubkey_agent_runas);
|
|
Jan F. Chadima |
201f4a |
+ if (!runas_pw) {
|
|
Jan F. Chadima |
201f4a |
+ error("%s: getpwnam(\"%s\"): %s", __func__,
|
|
Jan F. Chadima |
201f4a |
+ options.pubkey_agent_runas, strerror(errno));
|
|
Jan F. Chadima |
201f4a |
+ return 0;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ /* Temporarily use the specified uid. */
|
|
Jan F. Chadima |
201f4a |
+ if (runas_pw->pw_uid != 0)
|
|
Jan F. Chadima |
201f4a |
+ temporarily_use_uid(runas_pw);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ pubkey_agent_string = percent_expand(options.pubkey_agent,
|
|
Jan F. Chadima |
201f4a |
+ "h", pw->pw_dir, "u", pw->pw_name, (char *)NULL);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ /* Test whether agent can be modified by non root user */
|
|
Jan F. Chadima |
201f4a |
+ tmp_pubkey_agent_string = xstrdup (pubkey_agent_string);
|
|
Jan F. Chadima |
201f4a |
+ progname = strtok (tmp_pubkey_agent_string, WHITESPACE);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ debug3("%s: checking program '%s'", __func__, progname);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (stat (progname, &st) < 0) {
|
|
Jan F. Chadima |
201f4a |
+ error("%s: stat(\"%s\"): %s", __func__,
|
|
Jan F. Chadima |
201f4a |
+ progname, strerror(errno));
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (st.st_uid != 0 || (st.st_mode & 022) != 0) {
|
|
Jan F. Chadima |
201f4a |
+ error("bad ownership or modes for pubkey agent \"%s\"",
|
|
Jan F. Chadima |
201f4a |
+ progname);
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (!S_ISREG(st.st_mode)) {
|
|
Jan F. Chadima |
201f4a |
+ error("pubkey agent \"%s\" is not a regular file",
|
|
Jan F. Chadima |
201f4a |
+ progname);
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ /*
|
|
Jan F. Chadima |
201f4a |
+ * Descend the path, checking that each component is a
|
|
Jan F. Chadima |
201f4a |
+ * root-owned directory with strict permissions.
|
|
Jan F. Chadima |
201f4a |
+ */
|
|
Jan F. Chadima |
201f4a |
+ do {
|
|
Jan F. Chadima |
201f4a |
+ if ((cp = strrchr(progname, '/')) == NULL)
|
|
Jan F. Chadima |
201f4a |
+ break;
|
|
Jan F. Chadima |
201f4a |
+ else
|
|
Jan F. Chadima |
201f4a |
+ *cp = '\0';
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ debug3("%s: checking component '%s'", __func__, progname);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (stat(progname, &st) != 0) {
|
|
Jan F. Chadima |
201f4a |
+ error("%s: stat(\"%s\"): %s", __func__,
|
|
Jan F. Chadima |
201f4a |
+ progname, strerror(errno));
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+ if (st.st_uid != 0 || (st.st_mode & 022) != 0) {
|
|
Jan F. Chadima |
201f4a |
+ error("bad ownership or modes for pubkey agent path component \"%s\"",
|
|
Jan F. Chadima |
201f4a |
+ progname);
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+ if (!S_ISDIR(st.st_mode)) {
|
|
Jan F. Chadima |
201f4a |
+ error("pubkey agent path component \"%s\" is not a directory",
|
|
Jan F. Chadima |
201f4a |
+ progname);
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+ } while (0);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ /* open the pipe and read the keys */
|
|
Jan F. Chadima |
201f4a |
+ f = popen (pubkey_agent_string, "r");
|
|
Jan F. Chadima |
201f4a |
+ if (!f) {
|
|
Jan F. Chadima |
201f4a |
+ error("%s: popen (\"%s\", \"r\"): %s", __func__,
|
|
Jan F. Chadima |
201f4a |
+ pubkey_agent_string, strerror (errno));
|
|
Jan F. Chadima |
201f4a |
+ goto go_away;
|
|
Jan F. Chadima |
201f4a |
+ }
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ found_key = user_search_key_in_file (f, options.pubkey_agent, key, pw);
|
|
Jan F. Chadima |
201f4a |
+ pclose (f);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+go_away:
|
|
Jan F. Chadima |
201f4a |
+ if (tmp_pubkey_agent_string)
|
|
Jan F. Chadima |
201f4a |
+ xfree (tmp_pubkey_agent_string);
|
|
Jan F. Chadima |
201f4a |
+ if (pubkey_agent_string)
|
|
Jan F. Chadima |
201f4a |
+ xfree (pubkey_agent_string);
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ if (runas_pw->pw_uid != 0)
|
|
Jan F. Chadima |
201f4a |
+ restore_uid();
|
|
Jan F. Chadima |
201f4a |
+ return found_key;
|
|
Jan F. Chadima |
201f4a |
+}
|
|
Jan F. Chadima |
201f4a |
+#endif
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+/* check whether given key is in
|
|
Jan F. Chadima |
201f4a |
int
|
|
Jan F. Chadima |
201f4a |
user_key_allowed(struct passwd *pw, Key *key)
|
|
Jan F. Chadima |
201f4a |
{
|
|
Jan F. Chadima |
201f4a |
int success;
|
|
Jan F. Chadima |
201f4a |
char *file;
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
+#ifdef WITH_PUBKEY_AGENT
|
|
Jan F. Chadima |
201f4a |
+ success = user_key_via_agent_allowed2(pw, key);
|
|
Jan F. Chadima |
201f4a |
+ if (success >= 0)
|
|
Jan F. Chadima |
201f4a |
+ return success;
|
|
Jan F. Chadima |
201f4a |
+#endif
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
ef5d19 |
if (auth_key_is_revoked(key))
|
|
Jan F. Chadima |
ef5d19 |
return 0;
|
|
Jan F. Chadima |
ef5d19 |
if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key))
|
|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/configure.ac.pka openssh-5.4p1/configure.ac
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/configure.ac.pka 2010-03-09 08:01:04.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/configure.ac 2010-03-09 08:01:05.000000000 +0100
|
|
Jan F. Chadima |
974c89 |
@@ -1323,6 +1323,18 @@ AC_ARG_WITH(audit,
|
|
Jan F. Chadima |
9051e5 |
esac ]
|
|
Jan F. Chadima |
9051e5 |
)
|
|
Jan F. Chadima |
9051e5 |
|
|
Jan F. Chadima |
9051e5 |
+# Check whether user wants pubkey agent support
|
|
Jan F. Chadima |
9051e5 |
+PKA_MSG="no"
|
|
Jan F. Chadima |
9051e5 |
+AC_ARG_WITH(pka,
|
|
Jan F. Chadima |
9051e5 |
+ [ --with-pka Enable pubkey agent support],
|
|
Jan F. Chadima |
9051e5 |
+ [
|
|
Jan F. Chadima |
9051e5 |
+ if test "x$withval" != "xno" ; then
|
|
Jan F. Chadima |
9051e5 |
+ AC_DEFINE([WITH_PUBKEY_AGENT], 1, [Enable pubkey agent support])
|
|
Jan F. Chadima |
9051e5 |
+ PKA_MSG="yes"
|
|
Jan F. Chadima |
9051e5 |
+ fi
|
|
Jan F. Chadima |
9051e5 |
+ ]
|
|
Jan F. Chadima |
9051e5 |
+)
|
|
Jan F. Chadima |
9051e5 |
+
|
|
Jan F. Chadima |
9051e5 |
dnl Checks for library functions. Please keep in alphabetical order
|
|
Jan F. Chadima |
9051e5 |
AC_CHECK_FUNCS( \
|
|
Jan F. Chadima |
9051e5 |
arc4random \
|
|
Jan F. Chadima |
974c89 |
@@ -4206,6 +4218,7 @@ echo " Linux audit support
|
|
Jan F. Chadima |
9051e5 |
echo " Smartcard support: $SCARD_MSG"
|
|
Jan F. Chadima |
9051e5 |
echo " S/KEY support: $SKEY_MSG"
|
|
Jan F. Chadima |
9051e5 |
echo " TCP Wrappers support: $TCPW_MSG"
|
|
Jan F. Chadima |
9051e5 |
+echo " PKA support: $PKA_MSG"
|
|
Jan F. Chadima |
9051e5 |
echo " MD5 password support: $MD5_MSG"
|
|
Jan F. Chadima |
9051e5 |
echo " libedit support: $LIBEDIT_MSG"
|
|
Jan F. Chadima |
9051e5 |
echo " Solaris process contract support: $SPC_MSG"
|
|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/servconf.c.pka openssh-5.4p1/servconf.c
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/servconf.c.pka 2010-03-09 08:01:04.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/servconf.c 2010-03-09 09:04:57.000000000 +0100
|
|
Jan F. Chadima |
974c89 |
@@ -129,6 +129,8 @@ initialize_server_options(ServerOptions
|
|
Jan F. Chadima |
201f4a |
options->num_permitted_opens = -1;
|
|
Jan F. Chadima |
201f4a |
options->adm_forced_command = NULL;
|
|
Jan F. Chadima |
201f4a |
options->chroot_directory = NULL;
|
|
Jan F. Chadima |
201f4a |
+ options->pubkey_agent = NULL;
|
|
Jan F. Chadima |
201f4a |
+ options->pubkey_agent_runas = NULL;
|
|
Jan F. Chadima |
201f4a |
options->zero_knowledge_password_authentication = -1;
|
|
Jan F. Chadima |
ef5d19 |
options->revoked_keys_file = NULL;
|
|
Jan F. Chadima |
ef5d19 |
options->trusted_user_ca_keys = NULL;
|
|
Jan F. Chadima |
ef5d19 |
@@ -315,6 +317,7 @@ typedef enum {
|
|
Jan F. Chadima |
201f4a |
sUsePrivilegeSeparation, sAllowAgentForwarding,
|
|
Jan F. Chadima |
974c89 |
sZeroKnowledgePasswordAuthentication, sHostCertificate,
|
|
Jan F. Chadima |
ef5d19 |
sRevokedKeys, sTrustedUserCAKeys,
|
|
Jan F. Chadima |
201f4a |
+ sPubkeyAgent, sPubkeyAgentRunAs,
|
|
Jan F. Chadima |
201f4a |
sDeprecated, sUnsupported
|
|
Jan F. Chadima |
201f4a |
} ServerOpCodes;
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
ef5d19 |
@@ -437,6 +440,13 @@ static struct {
|
|
Jan F. Chadima |
974c89 |
{ "hostcertificate", sHostCertificate, SSHCFG_GLOBAL },
|
|
Jan F. Chadima |
ef5d19 |
{ "revokedkeys", sRevokedKeys, SSHCFG_ALL },
|
|
Jan F. Chadima |
ef5d19 |
{ "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
|
|
Jan F. Chadima |
201f4a |
+#ifdef WITH_PUBKEY_AGENT
|
|
Jan F. Chadima |
201f4a |
+ { "pubkeyagent", sPubkeyAgent, SSHCFG_ALL },
|
|
Jan F. Chadima |
201f4a |
+ { "pubkeyagentrunas", sPubkeyAgentRunAs, SSHCFG_ALL },
|
|
Jan F. Chadima |
201f4a |
+#else
|
|
Jan F. Chadima |
201f4a |
+ { "pubkeyagent", sUnsupported, SSHCFG_ALL },
|
|
Jan F. Chadima |
201f4a |
+ { "pubkeyagentrunas", sUnsupported, SSHCFG_ALL },
|
|
Jan F. Chadima |
201f4a |
+#endif
|
|
Jan F. Chadima |
201f4a |
{ NULL, sBadOption, 0 }
|
|
Jan F. Chadima |
201f4a |
};
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
ef5d19 |
@@ -1345,6 +1355,20 @@ process_server_config_line(ServerOptions
|
|
Jan F. Chadima |
ef5d19 |
charptr = &options->revoked_keys_file;
|
|
Jan F. Chadima |
ef5d19 |
goto parse_filename;
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
+ case sPubkeyAgent:
|
|
Jan F. Chadima |
201f4a |
+ len = strspn(cp, WHITESPACE);
|
|
Jan F. Chadima |
201f4a |
+ if (*activep && options->pubkey_agent == NULL)
|
|
Jan F. Chadima |
201f4a |
+ options->pubkey_agent = xstrdup(cp + len);
|
|
Jan F. Chadima |
201f4a |
+ return 0;
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ case sPubkeyAgentRunAs:
|
|
Jan F. Chadima |
201f4a |
+ charptr = &options->pubkey_agent_runas;
|
|
Jan F. Chadima |
9051e5 |
+
|
|
Jan F. Chadima |
9051e5 |
+ arg = strdelim(&cp;;
|
|
Jan F. Chadima |
9051e5 |
+ if (*activep && *charptr == NULL)
|
|
Jan F. Chadima |
9051e5 |
+ *charptr = xstrdup(arg);
|
|
Jan F. Chadima |
201f4a |
+ break;
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
case sDeprecated:
|
|
Jan F. Chadima |
201f4a |
logit("%s line %d: Deprecated option %s",
|
|
Jan F. Chadima |
201f4a |
filename, linenum, arg);
|
|
Jan F. Chadima |
ef5d19 |
@@ -1438,6 +1462,8 @@ copy_set_server_options(ServerOptions *d
|
|
Jan F. Chadima |
201f4a |
M_CP_INTOPT(gss_authentication);
|
|
Jan F. Chadima |
201f4a |
M_CP_INTOPT(rsa_authentication);
|
|
Jan F. Chadima |
201f4a |
M_CP_INTOPT(pubkey_authentication);
|
|
Jan F. Chadima |
201f4a |
+ M_CP_STROPT(pubkey_agent);
|
|
Jan F. Chadima |
201f4a |
+ M_CP_STROPT(pubkey_agent_runas);
|
|
Jan F. Chadima |
201f4a |
M_CP_INTOPT(kerberos_authentication);
|
|
Jan F. Chadima |
201f4a |
M_CP_INTOPT(hostbased_authentication);
|
|
Jan F. Chadima |
201f4a |
M_CP_INTOPT(kbd_interactive_authentication);
|
|
Jan F. Chadima |
ef5d19 |
@@ -1683,6 +1709,8 @@ dump_config(ServerOptions *o)
|
|
Jan F. Chadima |
974c89 |
dump_cfg_string(sChrootDirectory, o->chroot_directory);
|
|
Jan F. Chadima |
ef5d19 |
dump_cfg_string(sTrustedUserCAKeys, o->trusted_user_ca_keys);
|
|
Jan F. Chadima |
ef5d19 |
dump_cfg_string(sRevokedKeys, o->revoked_keys_file);
|
|
Jan F. Chadima |
201f4a |
+ dump_cfg_string(sPubkeyAgent, o->pubkey_agent);
|
|
Jan F. Chadima |
201f4a |
+ dump_cfg_string(sPubkeyAgentRunAs, o->pubkey_agent_runas);
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
/* string arguments requiring a lookup */
|
|
Jan F. Chadima |
201f4a |
dump_cfg_string(sLogLevel, log_level_name(o->log_level));
|
|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/servconf.h.pka openssh-5.4p1/servconf.h
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/servconf.h.pka 2010-03-09 08:01:04.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/servconf.h 2010-03-09 09:05:29.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
@@ -157,6 +157,8 @@ typedef struct {
|
|
Jan F. Chadima |
201f4a |
char *chroot_directory;
|
|
Jan F. Chadima |
ef5d19 |
char *revoked_keys_file;
|
|
Jan F. Chadima |
ef5d19 |
char *trusted_user_ca_keys;
|
|
Jan F. Chadima |
201f4a |
+ char *pubkey_agent;
|
|
Jan F. Chadima |
201f4a |
+ char *pubkey_agent_runas;
|
|
Jan F. Chadima |
201f4a |
} ServerOptions;
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
void initialize_server_options(ServerOptions *);
|
|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/sshd_config.0.pka openssh-5.4p1/sshd_config.0
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/sshd_config.0.pka 2010-03-09 08:01:04.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/sshd_config.0 2010-03-09 09:07:35.000000000 +0100
|
|
Jan F. Chadima |
974c89 |
@@ -352,7 +352,8 @@ DESCRIPTION
|
|
Jan F. Chadima |
201f4a |
KbdInteractiveAuthentication, KerberosAuthentication,
|
|
Jan F. Chadima |
974c89 |
MaxAuthTries, MaxSessions, PasswordAuthentication,
|
|
Jan F. Chadima |
974c89 |
PermitEmptyPasswords, PermitOpen, PermitRootLogin,
|
|
Jan F. Chadima |
974c89 |
- PubkeyAuthentication, RhostsRSAAuthentication, RSAAuthentication,
|
|
Jan F. Chadima |
974c89 |
+ PubkeyAuthentication, PubkeyAgent, PubkeyAgentRunAs,
|
|
Jan F. Chadima |
974c89 |
+ RhostsRSAAuthentication, RSAAuthentication,
|
|
Jan F. Chadima |
974c89 |
X11DisplayOffset, X11Forwarding and X11UseLocalHost.
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
MaxAuthTries
|
|
Jan F. Chadima |
ef5d19 |
@@ -467,6 +468,17 @@ DESCRIPTION
|
|
Jan F. Chadima |
ef5d19 |
this file is not readable, then public key authentication will be
|
|
Jan F. Chadima |
ef5d19 |
refused for all users.
|
|
Jan F. Chadima |
201f4a |
|
|
Jan F. Chadima |
201f4a |
+ PubkeyAgent
|
|
Jan F. Chadima |
201f4a |
+ Specifies which agent is used for lookup of the user's public
|
|
Jan F. Chadima |
201f4a |
+ keys. Empty string means to use the authorized_keys file. By
|
|
Jan F. Chadima |
201f4a |
+ default there is no PubkeyAgent set. Note that this option has
|
|
Jan F. Chadima |
201f4a |
+ an effect only with PubkeyAuthentication switched on.
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
+ PubkeyAgentRunAs
|
|
Jan F. Chadima |
201f4a |
+ Specifies the user under whose account the PubkeyAgent is run.
|
|
Jan F. Chadima |
201f4a |
+ Empty string (the default value) means the user being authorized
|
|
Jan F. Chadima |
201f4a |
+ is used.
|
|
Jan F. Chadima |
201f4a |
+
|
|
Jan F. Chadima |
201f4a |
RhostsRSAAuthentication
|
|
Jan F. Chadima |
201f4a |
Specifies whether rhosts or /etc/hosts.equiv authentication to-
|
|
Jan F. Chadima |
201f4a |
gether with successful RSA host authentication is allowed. The
|
|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/sshd_config.5.pka openssh-5.4p1/sshd_config.5
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/sshd_config.5.pka 2010-03-09 08:01:04.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/sshd_config.5 2010-03-09 09:06:40.000000000 +0100
|
|
Jan F. Chadima |
974c89 |
@@ -618,6 +618,9 @@ Available keywords are
|
|
Jan F. Chadima |
201f4a |
.Cm KerberosAuthentication ,
|
|
Jan F. Chadima |
201f4a |
.Cm MaxAuthTries ,
|
|
Jan F. Chadima |
201f4a |
.Cm MaxSessions ,
|
|
Jan F. Chadima |
201f4a |
+.Cm PubkeyAuthentication ,
|
|
Jan F. Chadima |
201f4a |
+.Cm PubkeyAgent ,
|
|
Jan F. Chadima |
201f4a |
+.Cm PubkeyAgentRunAs ,
|
|
Jan F. Chadima |
201f4a |
.Cm PasswordAuthentication ,
|
|
Jan F. Chadima |
201f4a |
.Cm PermitEmptyPasswords ,
|
|
Jan F. Chadima |
201f4a |
.Cm PermitOpen ,
|
|
Jan F. Chadima |
ef5d19 |
@@ -819,6 +822,16 @@ Specifies a list of revoked public keys.
|
|
Jan F. Chadima |
ef5d19 |
Keys listed in this file will be refused for public key authentication.
|
|
Jan F. Chadima |
ef5d19 |
Note that if this file is not readable, then public key authentication will
|
|
Jan F. Chadima |
ef5d19 |
be refused for all users.
|
|
Jan F. Chadima |
ef5d19 |
++.It Cm PubkeyAgent
|
|
Jan F. Chadima |
ef5d19 |
++Specifies which agent is used for lookup of the user's public
|
|
Jan F. Chadima |
ef5d19 |
++keys. Empty string means to use the authorized_keys file.
|
|
Jan F. Chadima |
ef5d19 |
++By default there is no PubkeyAgent set.
|
|
Jan F. Chadima |
ef5d19 |
++Note that this option has an effect only with PubkeyAuthentication
|
|
Jan F. Chadima |
ef5d19 |
++switched on.
|
|
Jan F. Chadima |
ef5d19 |
++.It Cm PubkeyAgentRunAs
|
|
Jan F. Chadima |
ef5d19 |
++Specifies the user under whose account the PubkeyAgent is run. Empty
|
|
Jan F. Chadima |
ef5d19 |
++string (the default value) means the user being authorized is used.
|
|
Jan F. Chadima |
ef5d19 |
++.Dq
|
|
Jan F. Chadima |
201f4a |
.It Cm RhostsRSAAuthentication
|
|
Jan F. Chadima |
201f4a |
Specifies whether rhosts or /etc/hosts.equiv authentication together
|
|
Jan F. Chadima |
201f4a |
with successful RSA host authentication is allowed.
|
|
Jan F. Chadima |
974c89 |
diff -up openssh-5.4p1/sshd_config.pka openssh-5.4p1/sshd_config
|
|
Jan F. Chadima |
ef5d19 |
--- openssh-5.4p1/sshd_config.pka 2010-03-09 08:01:04.000000000 +0100
|
|
Jan F. Chadima |
ef5d19 |
+++ openssh-5.4p1/sshd_config 2010-03-09 08:01:06.000000000 +0100
|
|
Jan F. Chadima |
974c89 |
@@ -45,6 +45,8 @@ SyslogFacility AUTHPRIV
|
|
Jan F. Chadima |
974c89 |
#RSAAuthentication yes
|
|
Jan F. Chadima |
974c89 |
#PubkeyAuthentication yes
|
|
Jan F. Chadima |
974c89 |
#AuthorizedKeysFile .ssh/authorized_keys
|
|
Jan F. Chadima |
974c89 |
+#PubkeyAgent none
|
|
Jan F. Chadima |
974c89 |
+#PubkeyAgentRunAs nobody
|
|
Jan F. Chadima |
974c89 |
|
|
Jan F. Chadima |
974c89 |
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
|
Jan F. Chadima |
974c89 |
#RhostsRSAAuthentication no
|