Bugzilla – Attachment 498 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]
Add unsetenv() to openbsd-compat
openssh-aix-krb5ccname.patch (text/plain), 2.84 KB, created by
Darren Tucker
on 2003-11-12 22:43:31 AEDT
(
hide
)
Description:
Add unsetenv() to openbsd-compat
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2003-11-12 22:43:31 AEDT
Size:
2.84 KB
patch
obsolete
>Index: configure.ac >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v >retrieving revision 1.173 >diff -u -p -r1.173 configure.ac >--- configure.ac 15 Oct 2003 06:57:57 -0000 1.173 >+++ configure.ac 13 Nov 2003 00:50:24 -0000 >@@ -744,7 +744,7 @@ AC_CHECK_FUNCS(\ > setproctitle setregid setresgid setresuid setreuid setrlimit \ > setsid setvbuf sigaction sigvec snprintf socketpair strerror \ > strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \ >- truncate utimes vhangup vsnprintf waitpid \ >+ truncate unsetenv utimes vhangup vsnprintf waitpid \ > ) > > # IRIX has a const char return value for gai_strerror() >Index: sshd.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/sshd.c,v >retrieving revision 1.264 >diff -u -p -r1.264 sshd.c >--- sshd.c 3 Oct 2003 07:57:24 -0000 1.264 >+++ sshd.c 13 Nov 2003 02:28:29 -0000 >@@ -931,6 +931,13 @@ main(int ac, char **av) > SYSLOG_FACILITY_AUTH : options.log_facility, > log_stderr || !inetd_flag); > >+#ifdef _AIX >+ /* >+ * Unset KRB5CCNAME, otherwise the user's session may inherit it from >+ * root's environment >+ */ >+ unsetenv("KRB5CCNAME"); >+#endif /* _AIX */ > #ifdef _UNICOS > /* Cray can define user privs drop all prives now! > * Not needed on PRIV_SU systems! >Index: openbsd-compat/bsd-misc.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/openbsd-compat/bsd-misc.c,v >retrieving revision 1.19 >diff -u -p -r1.19 bsd-misc.c >--- openbsd-compat/bsd-misc.c 25 Aug 2003 01:16:21 -0000 1.19 >+++ openbsd-compat/bsd-misc.c 13 Nov 2003 04:45:34 -0000 >@@ -201,6 +201,25 @@ tcsendbreak(int fd, int duration) > } > #endif /* HAVE_TCSENDBREAK */ > >+#ifndef HAVE_UNSETENV >+void >+unsetenv(const char *name) >+{ >+ extern char **environ; >+ char **curenv, **moveenv; >+ size_t len; >+ >+ len = strlen(name); >+ for (curenv = environ; *curenv != NULL; curenv++) { >+ if (strncmp(*curenv, name, len) == 0 && (*curenv)[len] == '=') { >+ for (moveenv = curenv; *moveenv != NULL; moveenv++) >+ *moveenv = *(moveenv + 1); >+ curenv--; >+ } >+ } >+} >+#endif /* HAVE_UNSETENV */ >+ > mysig_t > mysignal(int sig, mysig_t act) > { >Index: openbsd-compat/bsd-misc.h >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/openbsd-compat/bsd-misc.h,v >retrieving revision 1.13 >diff -u -p -r1.13 bsd-misc.h >--- openbsd-compat/bsd-misc.h 29 Aug 2003 16:59:52 -0000 1.13 >+++ openbsd-compat/bsd-misc.h 13 Nov 2003 00:51:40 -0000 >@@ -97,6 +97,10 @@ pid_t tcgetpgrp(int); > int tcsendbreak(int, int); > #endif > >+#ifndef HAVE_UNSETENV >+void unsetenv(const char *); >+#endif >+ > /* wrapper for signal interface */ > typedef void (*mysig_t)(int); > mysig_t mysignal(int sig, mysig_t act);
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