Bugzilla – Attachment 497 Details for
Bug 757
KRB5CCNAME inherited from root's environment under AIX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
unsets KRB5CCNAME at the beginning of main() in sshd.c
aixkrbcc.patch (text/plain), 1.29 KB, created by
Mike Dopheide
on 2003-11-12 16:30:44 AEDT
(
hide
)
Description:
unsets KRB5CCNAME at the beginning of main() in sshd.c
Filename:
MIME Type:
Creator:
Mike Dopheide
Created:
2003-11-12 16:30:44 AEDT
Size:
1.29 KB
patch
obsolete
>*** sshd.c.orig 2003-11-12 17:09:08.000000000 -0600 >--- sshd.c 2003-11-12 17:12:46.000000000 -0600 >*************** >*** 815,820 **** >--- 815,825 ---- > Authctxt *authctxt; > Key *key; > int ret, key_used = 0; >+ #ifdef _AIX >+ extern char **environ; >+ char **curenv, **moveenv; >+ char *krbccenv = "KRB5CCNAME"; >+ #endif /* _AIX */ > > #ifdef HAVE_SECUREWARE > (void)set_auth_parameters(ac, av); >*************** >*** 822,827 **** >--- 827,848 ---- > __progname = ssh_get_progname(av[0]); > init_rng(); > >+ #ifdef _AIX >+ /* We do this so KRB5CCNAME doesn't accidentally get inherited */ >+ /* from root's environment as a result of the AIX additions */ >+ /* in session.c */ >+ /* borrowed from Todd Winks, originally based on sudo source */ >+ >+ for (curenv = environ; *curenv; curenv++) { >+ if (strncmp(*curenv, krbccenv, strlen(krbccenv)) == 0) { >+ /* Found variable; move subsequent variables over it */ >+ for (moveenv = curenv; *moveenv; moveenv++) >+ *moveenv = *(moveenv + 1); >+ curenv--; >+ } >+ } >+ #endif /* _AIX */ >+ > /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ > saved_argc = ac; > saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
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 757
:
497
|
498
|
517
|
520