make roken not provide environ, its really something that doesnt work in a multinamespace enviroments (read mac os x)

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23943 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-10-19 04:57:42 +00:00
parent 7fee3c4315
commit 3ad1d78d63
9 changed files with 24 additions and 9 deletions

View File

@@ -69,6 +69,11 @@ add_env(const char *var, const char *value)
extend_env(str); extend_env(str);
} }
#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif
void void
copy_env(void) copy_env(void)
{ {

View File

@@ -64,6 +64,10 @@ RCSID("$Id$");
#include "supaths.h" #include "supaths.h"
#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif
int kerberos_flag = 1; int kerberos_flag = 1;
int csh_f_flag; int csh_f_flag;
int full_login; int full_login;
@@ -506,7 +510,7 @@ main(int argc, char **argv)
if (ok == 5) if (ok == 5)
krb5_start_session(); krb5_start_session();
#endif #endif
execv(shell, args); execve(shell, args, environ);
} }
exit(1); exit(1);

View File

@@ -1553,8 +1553,8 @@ env_find(unsigned char *var)
return(NULL); return(NULL);
} }
#ifdef IRIX4 #if !HAVE_DECL_ENVIRON
#define environ _environ extern char **environ;
#endif #endif
void void

View File

@@ -1186,7 +1186,9 @@ startslave(const char *host, const char *utmp_host,
} }
char *envinit[3]; char *envinit[3];
#if !HAVE_DECL_ENVIRON
extern char **environ; extern char **environ;
#endif
void void
init_env(void) init_env(void)

View File

@@ -63,7 +63,7 @@ find_var(char **env, char *assignment, size_t len)
*/ */
static int static int
rk_read_env_file(FILE *F, char ***env, int *assigned) read_env_file(FILE *F, char ***env, int *assigned)
{ {
int idx = 0; int idx = 0;
int i; int i;
@@ -139,7 +139,7 @@ read_environment(const char *file, char ***env)
if ((F = fopen(file, "r")) == NULL) if ((F = fopen(file, "r")) == NULL)
return 0; return 0;
rk_read_env_file(F, env, &assigned); read_env_file(F, env, &assigned);
fclose(F); fclose(F);
return assigned; return assigned;
} }

View File

@@ -38,7 +38,9 @@ RCSID("$Id$");
#include <stdlib.h> #include <stdlib.h>
#if !HAVE_DECL_ENVIRON
extern char **environ; extern char **environ;
#endif
/* /*
* putenv -- * putenv --

View File

@@ -444,10 +444,6 @@ extern int optind;
extern int opterr; extern int opterr;
#endif #endif
#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif
#ifndef HAVE_GETIPNODEBYNAME #ifndef HAVE_GETIPNODEBYNAME
struct hostent * ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_FUNCTION
getipnodebyname (const char *, int, int, int *); getipnodebyname (const char *, int, int, int *);

View File

@@ -51,6 +51,10 @@ RCSID("$Id$");
#include "roken.h" #include "roken.h"
#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif
#define EX_NOEXEC 126 #define EX_NOEXEC 126
#define EX_NOTFOUND 127 #define EX_NOTFOUND 127

View File

@@ -41,7 +41,9 @@ RCSID("$Id$");
#include "roken.h" #include "roken.h"
#if !HAVE_DECL_ENVIRON
extern char **environ; extern char **environ;
#endif
/* /*
* unsetenv -- * unsetenv --