Commit Graph

36 Commits

Author SHA1 Message Date
Todd C. Miller
1f3ea50afd Implement memset_s() and use it instead of zero_bytes().
A new constant, SUDO_CONV_REPL_MAX, is defined by the plugin
API as the max conversation reply length.  This constant can be
used as a max value for memset_s() when clearing passwords
filled in by the conversation function.
2013-08-03 08:30:06 -06:00
Todd C. Miller
d6282d154a Update copyright years. 2013-04-24 09:35:02 -04:00
Todd C. Miller
414fc377c9 Tru64 5.x does declare innetgr() and getdomainname(). 2013-04-01 16:39:30 -04:00
Todd C. Miller
f7b62e8dc1 Move SET/CLR/ISSET from config.h.in to missing.h 2013-04-01 15:38:09 -04:00
Todd C. Miller
6083947939 Tru64 Unix doesn't prototype innetgr() or getdomainname(). 2013-03-26 13:19:59 -04:00
Todd C. Miller
d710f1b41c Whitespace fixes 2013-03-26 10:27:06 -04:00
Todd C. Miller
4e5baccb9c Add __malloc_like macro to apply __malloc__ attribute to emalloc,
ecalloc and estrdup.  It cannot be applied to realloc since that
may return the same pointer.
2013-03-05 10:18:32 -05:00
Todd C. Miller
a449e8b3e7 Add howmany() macro since some systems have this in sys/param.h
which we no longer include.
2012-12-20 14:46:45 -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
3c9da162e4 Use MAX_HOST_NAME+1 (limits.h) instead of MAXHOSTNAMELEN (sys/param.h
or netdb.h).
2012-12-04 10:18:41 -05:00
Todd C. Miller
ab7dda035a Replace strsigname() with sig2str(), emulating it as needed. 2012-08-29 14:25:09 -04:00
Todd C. Miller
537dc94b9e Use strsigname() to print signal names in the debug output.
If the system has no strsigname(), use our own.
2012-08-26 20:12:51 -04:00
Todd C. Miller
60a3019483 Add support for controlling symbol visibility using the HP and
Solaris C compilers.
2012-06-15 14:18:23 -04:00
Todd C. Miller
1fe3f9f40f The visibility attribute was actually added in gcc 3.3.x, not 4.0.
Just assume that if -fvisibility=hidden works that the attribute
is usable.
2012-06-13 16:57:49 -04:00
Todd C. Miller
6f6b0dec6c Use gcc's visibility attribute to specify when symbols are visible
or hidden, if available.  If not available, use an ELF version
script if it is supported.  If all else fails, fall back to using
libtool's -export-symbols.
2012-06-13 14:01:16 -04:00
Todd C. Miller
4e0ffceacb Add offsetof macro for those without it. 2012-05-10 10:01:26 -04:00
Todd C. Miller
1e7afbd53f g/c __unused which is no longer used 2012-03-28 17:07:29 -04:00
Todd C. Miller
8c1d8a7b15 Make a copy of the struct passwd in exec_setup() to make sure nothing
in the policy init modifies it.
2012-02-06 10:56:39 -05:00
Todd C. Miller
47af0fc2b8 Add configure test for missing errno declaration and only
declare it ourselves if it is missing.
2011-08-30 10:05:30 -04:00
Todd C. Miller
b124635b04 Instead of keeping separate groups and gids arrays, create struct
group_info and use it to store both, along with a count for each.
Cache group info on a per-user basis using getgrouplist() to get
the groups.  We no longer need special to special case the user or
list user for user_in_group() and thus no longer need to reset the
groups list when listing another user.
2011-07-20 11:58:45 -04:00
Todd C. Miller
5cf56a77ec Provide mkdtemp() for systems without it. 2010-12-27 13:49:49 -05:00
Todd C. Miller
da67324b11 Declare innetgr() for HP-UX which is missing a declaration.
Declare domainname() for HP-UX and Solaris which are missing a declaration.
2010-09-13 11:52:46 -04:00
Todd C. Miller
0d935f8546 Move includes to the top of the file. 2010-09-03 19:28:42 -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
8dd8aa000e Remove some obsolete configure tests, ancient Unix systems are no
longer supported.
2010-08-10 13:44:05 -04:00
Todd C. Miller
684d1fd9f7 Fix mkstemps() prototype 2010-07-09 10:22:20 -04:00
Todd C. Miller
ea4298bb54 Use mkstemps() instead of mkstemp() in sudoedit. This allows sudoedit
to preserve the file extension (if any) which may be used by the editor
(like emacs) to choose the editing mode.
2010-07-09 10:08:05 -04:00
Todd C. Miller
b72a530fd0 Update copyright year 2010-06-14 12:19:49 -04:00
Todd C. Miller
e54cfc9bd4 We don't use getgrouplist() at the moment so there's no need to
provide a compat version.
2010-06-10 15:12:37 -04:00
Todd C. Miller
5770391ec4 No longer check for strdup or strndup for LIBOBJ replacement. 2010-04-05 19:47:49 -04:00
Todd C. Miller
8c91f0a30c Create our own sys_siglist for systems without it for use by strsignal() 2010-04-02 07:47:19 -04:00
Todd C. Miller
8db39a8586 Add checks for getgrset and getgrouplist and use replacement getgrouplist
if the system doesn't support it.
2010-03-22 08:25:30 -04:00
Todd C. Miller
fdbc4ecffb Include stdarg.h for va_list rather than requiring all consumers of
missing.h to include stdarg.h themselves.
2010-03-18 08:58:31 -04:00
Todd C. Miller
fc598f8e12 Add strdup and strndup and fix strsignal 2010-03-13 09:30:22 -05:00
Todd C. Miller
841807dd66 Convert to ANSI C 2010-02-27 09:26:43 -05:00
Todd C. Miller
e90fa482f9 Rework source layout in preparation for modular sudo. 2010-02-20 09:14:01 -05:00