Bugzilla – Attachment 1622 Details for
Bug 1583
User principal name in AIX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for user principal name (Unified diff)
auth-krb5.patch (text/plain), 1.52 KB, created by
Miguel Sanders
on 2009-04-02 16:47:00 AEDT
(
hide
)
Description:
Patch for user principal name (Unified diff)
Filename:
MIME Type:
Creator:
Miguel Sanders
Created:
2009-04-02 16:47:00 AEDT
Size:
1.52 KB
patch
obsolete
>--- auth-krb5.c 2009-04-02 07:44:20.827122109 +0200 >+++ auth-krb5-new.c 2009-04-02 07:44:26.845270580 +0200 >@@ -50,10 +50,14 @@ > #include <errno.h> > #include <unistd.h> > #include <string.h> > #include <krb5.h> > >+#ifdef _AIX >+#include <usersec.h> >+#endif /* _AIX */ >+ > extern ServerOptions options; > > static int > krb5_init(void *context) > { >@@ -82,13 +86,44 @@ > temporarily_use_uid(authctxt->pw); > > problem = krb5_init(authctxt); > if (problem) > goto out; >- >- problem = krb5_parse_name(authctxt->krb5_ctx, authctxt->pw->pw_name, >- &authctxt->krb5_user); >+#ifdef _AIX >+ char *authdomain = NULL; >+ char *authname = NULL; >+ setuserdb(S_READ); >+ getuserattr(authctxt->pw->pw_name, S_AUTHDOMAIN, &authdomain, SEC_CHAR); >+ getuserattr(authctxt->pw->pw_name, S_AUTHNAME, &authname, SEC_CHAR); >+ len = 1; >+ if (authname) >+ len += strlen(authname); >+ else >+ len += strlen(authctxt->pw->pw_name); >+ >+ if (authdomain) >+ len += strlen(authdomain + 1); >+ >+ char *client = xmalloc(len); >+ if (authname) >+ strcpy(client,authname); >+ else >+ strcpy(client,authctxt->pw->pw_name); >+ >+ if (authdomain) { >+ strcat(client,"@"); >+ strcat(client,authdomain); >+ } >+ >+ problem = krb5_parse_name(authctxt->krb5_ctx, client, >+ &authctxt->krb5_user); >+ xfree(client); >+ enduserdb(); >+#else >+ problem = krb5_parse_name(authctxt->krb5_ctx, authctxt->pw->pw_name, >+ &authctxt->krb5_user); >+#endif /* _AIX */ > if (problem) > goto out; > > #ifdef HEIMDAL > problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache);
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 1583
:
1621
|
1622
|
1627
|
1653
|
1654
|
1672
|
1713
|
1745