| Summary: | KRB5CCNAME inherited from root's environment under AIX | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Mike Dopheide <dopheide> | ||||||||||
| Component: | sshd | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||||||||
| Status: | CLOSED FIXED | ||||||||||||
| Severity: | minor | Keywords: | openbsd, patch | ||||||||||
| Priority: | P2 | ||||||||||||
| Version: | -current | ||||||||||||
| Hardware: | PPC | ||||||||||||
| OS: | AIX | ||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 793 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Mike Dopheide
2003-11-12 16:29:19 AEDT
Created attachment 497 [details]
unsets KRB5CCNAME at the beginning of main() in sshd.c
Created attachment 498 [details]
Add unsetenv() to openbsd-compat
This bit: strncmp(*curenv, krbccenv, strlen(krbccenv)) == 0
will match env variables longer than 10 chars where the first 10 are
"KRB5CCNAME".
AIX 5.2, at least, has an unsetenv(), so I think we should use it where
possible, and add one to openbsd-compat for versions that don't have it.
Created attachment 517 [details]
Clear child's environment
Please try this patch, which clears the child's entire environment.
Created attachment 520 [details] Clear daemon's environment at startup The patch in attachment #517 [details] probably won't work as it clear's the wrong environment. Please try this patch, which works for me if I manually set KRB5CCNAME before starting sshd. Yup, patch #520 works great in my tests. Are there plans to merge this into the OpenSSH portable tree? Comment on attachment 520 [details] Clear daemon's environment at startup >+ >+ /* Clear environment */ >+ environ[0] = NULL; hm, I think that cygwin may need to preserve some environment vars, so this needs to be !HAVE_CYGWIN at least. This has now been fixed, thanks for the report. - (dtucker) [sshd.c] Bug #757: Clear child's environment to prevent accidentally inheriting from root's environment. ok djm@ Mass change of RESOLVED bugs to CLOSED |