Todd C. Miller
e343e07543
Use #include <foo.h> instead of #include "foo.h" in most cases.
...
We rely on the include path to find many of these headers. It
especially doesn't make sense to use #include "foo.h" for headers
in the top-level include directory.
2023-09-25 10:13:28 -06:00
Todd C. Miller
5768d374cc
libsudo_util: silence most -Wconversion warnings.
2023-07-07 15:07:04 -06:00
Todd C. Miller
1f0f6b7c78
Fix some indentation.
2023-07-04 18:03:47 -06:00
Rose
732110428e
Fix fuzzing errors
...
We should be checking for integer overflow, rather than checking if size is 0.
Additionally, we should set errno to ENOMEM when this overflow happens.
Finally, the most efficient implementation of the round-up-to-2 algorithm involves the clz intrinsic.
2023-07-03 22:20:05 -04:00
Todd C. Miller
d3dc70ab62
sudo_parseln: use sudo_pow2_roundup() instead of hand-rolling it.
2023-07-03 17:17:47 -06:00
Todd C. Miller
446ae3f507
Include string.h unconditionally and only use strings.h for strn?casecmp()
...
In the pre-POSIX days BSD had strings.h, not string.h.
Now strings.h is only used for non-ANSI string functions.
2020-05-18 07:59:24 -06:00
Todd C. Miller
dd88460800
We no longer need to include headers we don't use for sudo*.h files.
...
Previously we needed to include headers required by the various
sudo*h files. Now those files are more self-sufficient and we
should only include headers needed by code in the various .c files.
2020-05-18 06:47:04 -06:00
Todd C. Miller
3bf4172272
Explicitly include stdio.h for getdelim(3)
2020-04-08 12:42:58 -06:00
Todd C. Miller
486ee2b71f
debug_decl and debug_decl_vars now require a semicolon at the end.
2019-12-22 08:48:16 -07:00
Todd C. Miller
1e1ef61902
Add SPDX-License-Identifier to files.
2019-04-29 07:21:51 -06:00
Todd C. Miller
de65d70929
Add a proper getdelim(3) replacement and use it instead of getline(3).
2019-04-08 10:37:30 -06:00
Todd C. Miller
6c3d20cb41
Convert PVS-Studio comment to ANSI C.
2018-10-26 08:39:09 -06:00
Todd C. Miller
64e5d34c57
Add comments in .c files so PVS-Studio will check them.
2018-10-21 08:46:05 -06:00
Todd C. Miller
48fba3c2cc
update my email to Todd.Miller@sudo.ws
2017-12-03 17:53:40 -07:00
Todd C. Miller
2a4ba64c84
Add flag to sudo_parseln() to disable line continuation support.
2016-09-01 10:50:39 -06:00
Todd C. Miller
17ad75d50b
Add a flags option to sudo_parseln() and a flag to only mach comments
...
at the beginning of the line. Use the flag when parsing ldap.conf.
2016-09-01 09:19:20 -06:00
Todd C. Miller
8b12390abf
Add debug_return_ssize_t
2015-11-01 15:13:28 -07:00
Todd C. Miller
3c644f5bc0
Return -1 if realloc() fails.
2015-07-14 14:48:04 -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
4f9cabd005
Remove obsolete memory.h include.
2015-06-18 21:02:57 -06:00
Todd C. Miller
a50555faa2
Remove support for the obsolete malloc.h header.
2015-06-18 20:30:59 -06:00
Todd C. Miller
1ce9dd5e07
Fix cast.
2015-02-23 06:32:43 -07: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
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
47835ff289
Rename missing.h -> sudo_compat.h
2014-07-22 14:25:16 -06:00
Todd C. Miller
844a285391
Version the functions in libsudo_util
2014-07-22 11:26:17 -06:00
Todd C. Miller
8e088e65c0
Split fileops.c into parseln.c and locking.c
2014-06-27 09:46:24 -06:00