Commit Graph

27 Commits

Author SHA1 Message Date
Todd C. Miller
12a1b672c0 We must include gettext.h before missing.h as it includes system
headers.  Also add missing DEFAULT_TEXT_DOMAIN defines in sudoers
audit code that does not include sudoers.h.
2014-02-11 09:40:59 -07:00
Todd C. Miller
291f88d2bc Need to include limits.h here too. 2013-12-18 15:01:04 -07:00
Todd C. Miller
adef363d00 Make a copy of readfds/writefds before calling select() instead
of calculating it each time.  Keep track of high fd in the base.
2013-10-31 16:13:15 -06:00
Todd C. Miller
99352d6738 Rename error.h -> fatal.h now that there is no error() function. 2013-08-15 14:24:29 -06:00
Todd C. Miller
85fc5792d4 Change some fatalx(NULL) that should be fatal(NULL). 2013-08-15 13:06:49 -06:00
Todd C. Miller
d6282d154a Update copyright years. 2013-04-24 09:35:02 -04:00
Todd C. Miller
39acd2fcba Rename error/errorx -> fatal/fatalx and remove the exit value as
it was always 1.
2013-04-18 14:07:59 -04:00
Todd C. Miller
d26c0d87f6 Convert efree() to a macro that just casts to void * and does free().
If the system free() can't handle free(NULL) this may crash but C89
was a long time ago.
2013-03-07 15:41:34 -05:00
Todd C. Miller
1d7072fe09 Don't include <sys/param.h>. We only needed it for MAXPATHLEN,
MAXHOSTNAMELEN and the MIN/MAX macros.  We now use PATH_MAX and
HOST_NAME_MAX throughout without falling back on MAXPATHLEN or
MAXHOSTNAMELEN and define our own MIN/MAX macros as needed.
2012-12-04 10:40:47 -05:00
Todd C. Miller
4bde57b8b2 Rename warning2()/error2() -> warning_nodebug()/error_nodebug(). 2012-11-25 09:34:10 -05:00
Todd C. Miller
1cf3def4be If vasprintf() fails, just use the errno it sets instead of assuming
ENOMEM.
2012-10-02 14:45:18 -04:00
Todd C. Miller
1d90c0ad71 No need to translate "unable to allocate memory" when we can just
use the system translation via strerror().
2012-09-17 16:59:26 -04:00
Todd C. Miller
241b2395cf Reduce the number of "internal error, foo overflow" messages that
need to be translated.
2012-08-10 12:18:38 -04:00
Todd C. Miller
dbbb48c45f Add ecalloc() and commented out recalloc().
Use inline strnlen() instead of strlen() in estrndup().
2012-03-19 11:23:25 -04:00
Todd C. Miller
9923464d96 Wrap error/errorx and warning/warningx functions with debug statements.
Disable wrapping for standalone sudoers programs as well as memory
allocation functions (to avoid infinite recursion).
2011-10-22 14:28:33 -04:00
Todd C. Miller
bf7e7b5752 Add gettext.h convenience header. This is similar to but distinct from
the one included with the gettext package.
2011-05-20 11:48:17 -04:00
Todd C. Miller
15bc74bd67 Include libint.h where needed. 2011-05-16 16:37:11 -04:00
Todd C. Miller
c865a462cc Prepare sudo front end messages for translation. 2011-05-06 17:47:51 -04:00
Todd C. Miller
53da5e8cdf Update copyright years. 2011-03-11 15:34:35 -05:00
Todd C. Miller
ae2f7638f5 standardize on "return foo;" rather than "return(foo);" or "return (foo);" 2011-01-24 15:15:18 -05:00
Todd C. Miller
1490269899 Include memory.h on systems that need it. 2010-09-13 10:40:53 -04:00
Todd C. Miller
10c3bb62c4 Make local includes consistent; use double quotes for local includes
except for generated ones where we use angle brackets.
Also g/c unused compat.h.
2010-09-07 16:45:19 -04:00
Todd C. Miller
f454727bb8 Merge compat.h and missing.h into missing.h 2010-08-16 14:05:44 -04:00
Todd C. Miller
30fe4a067c Set usrinfo for AIX
Set adminstrative domain for the process when looking up user's
    password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
    different things.  Fixes warnings on AIX and others.
2010-06-29 13:08:05 -04:00
Todd C. Miller
b72a530fd0 Update copyright year 2010-06-14 12:19:49 -04:00
Todd C. Miller
2ee7524101 Add casts to quiet compiler warnings. 2010-06-01 09:54:03 -04:00
Todd C. Miller
b8b006a885 Move code common to sudo and the sudoers plugin to a convenience library,
libcommon.  Removes the need to make links in the sudoers plugin dir
and reduces re-compilation of duplicate object files.
2010-05-27 17:27:36 -04:00