diff options
author | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:32:39 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:34:16 +0000 |
commit | 2ee2de47fd0f684f54218d31b4ec83930e69c18e (patch) | |
tree | 86848a7668424b392d48791a0e41e05f9df7b62b /gss-serv.c | |
parent | c9947303ad3c432b1cadfbeb1d95a7cd38662d66 (diff) | |
parent | 9cbb60f5e4932634db04c330c88abc49cc5567bd (diff) |
Merge 6.6p1.
* New upstream release (http://www.openssh.com/txt/release-6.6).
Diffstat (limited to 'gss-serv.c')
-rw-r--r-- | gss-serv.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/gss-serv.c b/gss-serv.c index feb1ed763..c33463bdf 100644 --- a/gss-serv.c +++ b/gss-serv.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gss-serv.c,v 1.24 2013/07/20 01:55:13 djm Exp $ */ | 1 | /* $OpenBSD: gss-serv.c,v 1.26 2014/02/26 20:28:44 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. | 4 | * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. |
@@ -72,6 +72,25 @@ ssh_gssapi_mech* supported_mechs[]= { | |||
72 | &gssapi_null_mech, | 72 | &gssapi_null_mech, |
73 | }; | 73 | }; |
74 | 74 | ||
75 | /* | ||
76 | * ssh_gssapi_supported_oids() can cause sandbox violations, so prepare the | ||
77 | * list of supported mechanisms before privsep is set up. | ||
78 | */ | ||
79 | static gss_OID_set supported_oids; | ||
80 | |||
81 | void | ||
82 | ssh_gssapi_prepare_supported_oids(void) | ||
83 | { | ||
84 | ssh_gssapi_supported_oids(&supported_oids); | ||
85 | } | ||
86 | |||
87 | OM_uint32 | ||
88 | ssh_gssapi_test_oid_supported(OM_uint32 *ms, gss_OID member, int *present) | ||
89 | { | ||
90 | if (supported_oids == NULL) | ||
91 | ssh_gssapi_prepare_supported_oids(); | ||
92 | return gss_test_oid_set_member(ms, member, supported_oids, present); | ||
93 | } | ||
75 | 94 | ||
76 | /* | 95 | /* |
77 | * Acquire credentials for a server running on the current host. | 96 | * Acquire credentials for a server running on the current host. |
@@ -435,7 +454,8 @@ ssh_gssapi_userok(char *user, struct passwd *pw) | |||
435 | gss_release_buffer(&lmin, &gssapi_client.displayname); | 454 | gss_release_buffer(&lmin, &gssapi_client.displayname); |
436 | gss_release_buffer(&lmin, &gssapi_client.exportedname); | 455 | gss_release_buffer(&lmin, &gssapi_client.exportedname); |
437 | gss_release_cred(&lmin, &gssapi_client.creds); | 456 | gss_release_cred(&lmin, &gssapi_client.creds); |
438 | memset(&gssapi_client, 0, sizeof(ssh_gssapi_client)); | 457 | explicit_bzero(&gssapi_client, |
458 | sizeof(ssh_gssapi_client)); | ||
439 | return 0; | 459 | return 0; |
440 | } | 460 | } |
441 | else | 461 | else |