Todd C. Miller
43a57126ea
Solaris 2.6 has the prototypes for inet_pton() and inet_ntop() in
...
resolv.h.
2015-07-09 10:11:25 -06:00
Todd C. Miller
0b241088b3
There's no need to conditionalize the #include <unistd.h>, we require
...
a POSIX system.
2015-07-02 09:08:28 -06:00
Todd C. Miller
4a07b472f0
Only include stddef.h where it is needed.
2015-06-20 05:34:35 -06:00
Todd C. Miller
dc883f2454
We require ANSI C so stop using the obsolete STDC_HEADERS.
2015-06-19 14:29:27 -06:00
Todd C. Miller
59ab26dbcc
Go back to a 2 args debug_decl and just use the "default" instance,
...
now renamed "active".
2015-02-01 08:24:49 -07:00
Todd C. Miller
cb09010da5
Use standard CIDR -> netmask conversion and disallow 0-bit CIDRs.
2014-12-31 15:47:33 -07:00
Todd C. Miller
e9914a91b1
The sudoers plugin now defines its own list of debugging subsystem names
...
and defines.
2014-10-22 13:30:52 -06:00
Todd C. Miller
866cfc4fc3
Add support for multiple Debug lines per program. Callers may
...
register arbitrary debug facilities or use built-in defaults. We
now use separate Debug statements for plugins and programs.
2014-10-22 13:23:05 -06:00
Todd C. Miller
85598f77b2
Use inet_pton() instead of inet_aton() and include a version from
...
BIND for those without it.
2014-02-05 10:00:07 -07:00
Todd C. Miller
aaecd326e4
Use inet_aton() instead of inet_addr() as it allows us to distinguish
...
between the address (or mask 255.255.255.255) and an error. In the
future we may consider switching to inet_pton() for IPv4 too.
2014-01-26 13:23:09 -07:00
Todd C. Miller
4c9650f78f
If inet_addr() returns INADDR_NONE, return false instead of iterating
...
through the interfaces looking for a match that will never happen.
2014-01-22 20:48:49 -07:00
Todd C. Miller
8f9ce7249a
Use strtonum() instead of atoi(), strtol() or strtoul() where possible.
2013-12-10 16:23:21 -07:00
Todd C. Miller
2508da6f68
Better match debugging.
...
Sprinkle const in match functions.
2013-12-05 14:34:56 -07:00
Todd C. Miller
07a804caf3
Quiet sign comparision warnings.
2013-10-23 15:03:31 -06:00
Todd C. Miller
f85106ea67
Use SLIST and STAILQ macros instead of doing headless singly linked
...
lists manually. As a bonus we now use a tail queue for ldap.c and
sudoreplay.c.
2013-10-22 09:08:09 -06:00
Todd C. Miller
d6282d154a
Update copyright years.
2013-04-24 09:35:02 -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
929aef0754
Make interfaces pointer private to interfaces.c and add get_interfaces()
...
accessor.
2012-10-25 13:15:52 -04:00
Todd C. Miller
0d5a941319
Add missing break between AF_INET and AF_INET6 in addr_matches_if_netmask()
2012-05-14 14:47:48 -04:00
Todd C. Miller
21a2f95821
Use stdbool.h instead of rolling our own TRUE/FALSE macros.
2011-12-02 11:27:33 -05:00
Todd C. Miller
51e45647ae
Use HAVE_STRUCT_TIMESPEC and HAVE_STRUCT_IN6_ADDR instead of
...
HAVE_TIMESPEC and HAVE_IN6_ADDR respectively.
2011-12-01 11:07:17 -05: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
1a259de176
Split out address matching into its own file and add regression
...
tests for it.
2011-08-29 14:10:18 -04:00