auth2-gss.c (126274) | auth2-gss.c (137015) |
---|---|
1/* $OpenBSD: auth2-gss.c,v 1.7 2003/11/21 11:57:03 djm Exp $ */ | 1/* $OpenBSD: auth2-gss.c,v 1.8 2004/06/21 17:36:31 avsm Exp $ */ |
2 3/* 4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 39 unchanged lines hidden (view full) --- 49 50/* 51 * We only support those mechanisms that we know about (ie ones that we know 52 * how to check local user kuserok and the like 53 */ 54static int 55userauth_gssapi(Authctxt *authctxt) 56{ | 2 3/* 4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 39 unchanged lines hidden (view full) --- 49 50/* 51 * We only support those mechanisms that we know about (ie ones that we know 52 * how to check local user kuserok and the like 53 */ 54static int 55userauth_gssapi(Authctxt *authctxt) 56{ |
57 gss_OID_desc oid = {0, NULL}; | 57 gss_OID_desc goid = {0, NULL}; |
58 Gssctxt *ctxt = NULL; 59 int mechs; 60 gss_OID_set supported; 61 int present; 62 OM_uint32 ms; 63 u_int len; 64 char *doid = NULL; 65 --- 14 unchanged lines hidden (view full) --- 80 xfree(doid); 81 82 present = 0; 83 doid = packet_get_string(&len); 84 85 if (len > 2 && 86 doid[0] == SSH_GSS_OIDTYPE && 87 doid[1] == len - 2) { | 58 Gssctxt *ctxt = NULL; 59 int mechs; 60 gss_OID_set supported; 61 int present; 62 OM_uint32 ms; 63 u_int len; 64 char *doid = NULL; 65 --- 14 unchanged lines hidden (view full) --- 80 xfree(doid); 81 82 present = 0; 83 doid = packet_get_string(&len); 84 85 if (len > 2 && 86 doid[0] == SSH_GSS_OIDTYPE && 87 doid[1] == len - 2) { |
88 oid.elements = doid + 2; 89 oid.length = len - 2; 90 gss_test_oid_set_member(&ms, &oid, supported, | 88 goid.elements = doid + 2; 89 goid.length = len - 2; 90 gss_test_oid_set_member(&ms, &goid, supported, |
91 &present); 92 } else { 93 logit("Badly formed OID received"); 94 } 95 } while (mechs > 0 && !present); 96 97 gss_release_oid_set(&ms, &supported); 98 99 if (!present) { 100 xfree(doid); 101 return (0); 102 } 103 | 91 &present); 92 } else { 93 logit("Badly formed OID received"); 94 } 95 } while (mechs > 0 && !present); 96 97 gss_release_oid_set(&ms, &supported); 98 99 if (!present) { 100 xfree(doid); 101 return (0); 102 } 103 |
104 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &oid)))) { | 104 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &goid)))) { |
105 xfree(doid); 106 return (0); 107 } 108 109 authctxt->methoddata=(void *)ctxt; 110 111 packet_start(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE); 112 --- 183 unchanged lines hidden --- | 105 xfree(doid); 106 return (0); 107 } 108 109 authctxt->methoddata=(void *)ctxt; 110 111 packet_start(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE); 112 --- 183 unchanged lines hidden --- |