Bugzilla – Attachment 1181 Details for
Bug 1225
Tidy up GSSAPI code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Aforementioned cody tidying patch
openssh-cvs-gss-code-tidy.patch (text/plain), 3.00 KB, created by
Simon Wilkinson
on 2006-09-10 22:58:32 AEST
(
hide
)
Description:
Aforementioned cody tidying patch
Filename:
MIME Type:
Creator:
Simon Wilkinson
Created:
2006-09-10 22:58:32 AEST
Size:
3.00 KB
patch
obsolete
>Index: gss-genr.c >=================================================================== >RCS file: /cvs/openssh/gss-genr.c,v >retrieving revision 1.19 >diff -u -r1.19 gss-genr.c >--- gss-genr.c 30 Aug 2006 01:08:04 -0000 1.19 >+++ gss-genr.c 10 Sep 2006 12:37:29 -0000 >@@ -226,39 +226,6 @@ > return (ctx->major); > } > >-/* Acquire credentials for a server running on the current host. >- * Requires that the context structure contains a valid OID >- */ >- >-/* Returns a GSSAPI error code */ >-OM_uint32 >-ssh_gssapi_acquire_cred(Gssctxt *ctx) >-{ >- OM_uint32 status; >- char lname[MAXHOSTNAMELEN]; >- gss_OID_set oidset; >- >- gss_create_empty_oid_set(&status, &oidset); >- gss_add_oid_set_member(&status, ctx->oid, &oidset); >- >- if (gethostname(lname, MAXHOSTNAMELEN)) { >- gss_release_oid_set(&status, &oidset); >- return (-1); >- } >- >- if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) { >- gss_release_oid_set(&status, &oidset); >- return (ctx->major); >- } >- >- if ((ctx->major = gss_acquire_cred(&ctx->minor, >- ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL))) >- ssh_gssapi_error(ctx); >- >- gss_release_oid_set(&status, &oidset); >- return (ctx->major); >-} >- > OM_uint32 > ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash) > { >@@ -279,16 +246,6 @@ > buffer_put_cstring(b, user); > buffer_put_cstring(b, service); > buffer_put_cstring(b, context); >-} >- >-OM_uint32 >-ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) >-{ >- if (*ctx) >- ssh_gssapi_delete_ctx(ctx); >- ssh_gssapi_build_ctx(ctx); >- ssh_gssapi_set_oid(*ctx, oid); >- return (ssh_gssapi_acquire_cred(*ctx)); > } > > int >Index: gss-serv.c >=================================================================== >RCS file: /cvs/openssh/gss-serv.c,v >retrieving revision 1.22 >diff -u -r1.22 gss-serv.c >--- gss-serv.c 1 Sep 2006 05:38:36 -0000 1.22 >+++ gss-serv.c 10 Sep 2006 12:37:29 -0000 >@@ -89,6 +89,49 @@ > gss_release_oid_set(&min_status, &supported); > } > >+OM_uint32 >+ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) >+{ >+ if (*ctx) >+ ssh_gssapi_delete_ctx(ctx); >+ ssh_gssapi_build_ctx(ctx); >+ ssh_gssapi_set_oid(*ctx, oid); >+ return (ssh_gssapi_acquire_cred(*ctx)); >+} >+ >+/* Acquire credentials for a server running on the current host. >+ * Requires that the context structure contains a valid OID >+ */ >+ >+/* Returns a GSSAPI error code */ >+OM_uint32 >+ssh_gssapi_acquire_cred(Gssctxt *ctx) >+{ >+ OM_uint32 status; >+ char lname[MAXHOSTNAMELEN]; >+ gss_OID_set oidset; >+ >+ gss_create_empty_oid_set(&status, &oidset); >+ gss_add_oid_set_member(&status, ctx->oid, &oidset); >+ >+ if (gethostname(lname, MAXHOSTNAMELEN)) { >+ gss_release_oid_set(&status, &oidset); >+ return (-1); >+ } >+ >+ if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) { >+ gss_release_oid_set(&status, &oidset); >+ return (ctx->major); >+ } >+ >+ if ((ctx->major = gss_acquire_cred(&ctx->minor, >+ ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL))) >+ ssh_gssapi_error(ctx); >+ >+ gss_release_oid_set(&status, &oidset); >+ return (ctx->major); >+} >+ > > /* Wrapper around accept_sec_context > * Requires that the context contains:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1225
: 1181