diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-07-26 16:10:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-07-26 16:10:17 +0000 |
commit | 828fe35b0dee0a24eae19e816e9f6bc05c720bc0 (patch) | |
tree | 2adb27efde016e50eadcf2e74892e19861268a25 /usr.bin/sudo/compat.h | |
parent | eb13f7f0aa17caa3bf79e5518751b3f095fb2445 (diff) |
Update to sudo 1.6.9p1. Note that the environment handling in sudo
1.6.9 has changed relative to older versions. Sudo now starts
commands with a minimal environment containing the variables in the
env_keep and env_check lists. This behavior is configurable in the
sudoers file. Please see the "SECURITY NOTES" section in the sudo
manual.
Diffstat (limited to 'usr.bin/sudo/compat.h')
-rw-r--r-- | usr.bin/sudo/compat.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/usr.bin/sudo/compat.h b/usr.bin/sudo/compat.h index 6a1a7cb9094..6469bb93c2a 100644 --- a/usr.bin/sudo/compat.h +++ b/usr.bin/sudo/compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2004 Todd C. Miller <Todd.Miller@courtesan.com> + * Copyright (c) 1996, 1998-2005 Todd C. Miller <Todd.Miller@courtesan.com> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -17,7 +17,7 @@ * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F39502-99-1-0512. * - * $Sudo: compat.h,v 1.80 2004/09/10 16:31:15 millert Exp $ + * $Sudo: compat.h,v 1.76.2.4 2007/06/12 01:28:41 millert Exp $ */ #ifndef _SUDO_COMPAT_H @@ -36,6 +36,29 @@ # endif #endif /* __P */ +/* Define away __attribute__ for non-gcc or old gcc */ +#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5 +# define __attribute__(x) +#endif + +/* For silencing gcc warnings about rcsids */ +#ifndef __unused +# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7) +# define __unused __attribute__((__unused__)) +# else +# define __unused +# endif +#endif + +/* For catching format string mismatches */ +#ifndef __printflike +# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define __printflike(f, v) __attribute__((__format__ (__printf__, f, v))) +# else +# define __printflike(f, v) +# endif +#endif + /* * Some systems lack full limit definitions. */ @@ -232,13 +255,6 @@ const char *getprogname __P((void)); #endif /* HAVE___PROGNAME */ #endif /* !HAVE_GETPROGNAME */ -#ifndef HAVE_TIMESPEC -struct timespec { - time_t tv_sec; - long tv_nsec; -}; -#endif /* !HAVE_TIMESPEC */ - #ifndef timespecclear # define timespecclear(ts) (ts)->tv_sec = (ts)->tv_nsec = 0 #endif |