Commit Graph

19 Commits

Author SHA1 Message Date
Todd C. Miller
d6282d154a Update copyright years. 2013-04-24 09:35:02 -04:00
Todd C. Miller
19d0946023 Simplify lbuf append functions by moving the realloc code into
lbuf_expand().  We now expand as needed each time bytes need to be
written to the lbuf.  Also handle a NULL pointer being passed in
for paranoia's sake.
2013-04-16 11:52:24 -04: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
e5257d48d7 Print a trailing newline in lbuf_print() when there is not enough
space to do word wrapping and the lbuf does not end with a newline.
2012-09-04 10:42:09 -04:00
Todd C. Miller
839919566e Add debug_decl/debug_return (almost) everywhere.
Remove old sudo_debug() and convert users to sudo_debug_printf().
2011-10-22 14:40:21 -04:00
Todd C. Miller
bd36d4f2ab Add primitive format string support to the lbuf code to make translations
simpler.
2011-05-20 15:25:03 -04:00
Todd C. Miller
9e65afc15f Fix printing of the remainder after a newline. Fixes "sudo -l" output
corruption that could occur in some cases.
2011-03-16 10:26:10 -04:00
Todd C. Miller
53da5e8cdf Update copyright years. 2011-03-11 15:34:35 -05:00
Todd C. Miller
151af93022 Truncate the buffer at buf.len before printing in the non-wordwrap case. 2011-02-14 11:28:44 -05:00
Todd C. Miller
ec00a1b588 Remove extra newline when the tty width is very small or unavailable 2011-02-14 11:04:24 -05:00
Todd C. Miller
fdf877d53b Do not need sys/time.h after all 2010-09-13 13:20:35 -04:00
Todd C. Miller
702a2bff2b Include sys/time.h for utimes() and struct timeval.
No longer need ioctl.h or termios.h
2010-09-13 13:17:26 -04: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
a68c31306c Convert a remaining puts() and putchar() to use the output function. 2010-08-20 16:53:21 -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
e5283b2f96 Require POSIX termios to build sudo 2010-06-09 11:09:55 -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