version 1.5, 2003/03/15 21:23:54 |
version 1.6, 2003/04/03 19:15:34 |
|
|
#ifdef HAVE_UNISTD_H |
#ifdef HAVE_UNISTD_H |
# include <unistd.h> |
# include <unistd.h> |
#endif /* HAVE_UNISTD_H */ |
#endif /* HAVE_UNISTD_H */ |
|
#ifdef HAVE_ERR_H |
|
# include <err.h> |
|
#else |
|
# include "emul/err.h" |
|
#endif /* HAVE_ERR_H */ |
#include <pwd.h> |
#include <pwd.h> |
#include <errno.h> |
|
|
|
#include "sudo.h" |
#include "sudo.h" |
|
|
#ifndef lint |
#ifndef lint |
static const char rcsid[] = "$Sudo: env.c,v 1.25 2003/03/15 20:31:01 millert Exp $"; |
static const char rcsid[] = "$Sudo: env.c,v 1.26 2003/04/02 18:25:19 millert Exp $"; |
#endif /* lint */ |
#endif /* lint */ |
|
|
/* |
/* |
|
|
#endif |
#endif |
#ifdef HAVE_KERB4 |
#ifdef HAVE_KERB4 |
"KRB_CONF*", |
"KRB_CONF*", |
"KRBCONFDIR" |
"KRBCONFDIR", |
"KRBTKFILE", |
"KRBTKFILE", |
#endif /* HAVE_KERB4 */ |
#endif /* HAVE_KERB4 */ |
#ifdef HAVE_KERB5 |
#ifdef HAVE_KERB5 |
|
|
if (strlcpy(estring, var, esize) >= esize || |
if (strlcpy(estring, var, esize) >= esize || |
strlcat(estring, "=", esize) >= esize || |
strlcat(estring, "=", esize) >= esize || |
strlcat(estring, val, esize) >= esize) { |
strlcat(estring, val, esize) >= esize) { |
(void) fprintf(stderr, "%s: internal error, format_env() overflow\n", |
|
Argv[0]); |
errx(1, "internal error, format_env() overflow"); |
exit(1); |
|
} |
} |
|
|
return(estring); |
return(estring); |