Rose
e095069d2a
Prefer fputs over fprintf where possible
...
fprintf does extra work and meant for formatting strings.
2023-10-15 10:28:57 -06:00
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
a38b714667
sudoers plugin: silence most -Wconversion warnings.
2023-07-07 15:07:04 -06:00
Rose
e54ba33ea0
Avoid compiler casting warnings by assigning to the same type where possible
...
This saves instructions that are related to casting as well as compiler warnings.
2023-06-28 17:25:26 -04:00
Todd C. Miller
d633d82f22
Fix typos and update excluded/ignored codespell lists.
2023-05-25 12:53:27 -06:00
Todd C. Miller
81a3339df9
Remove cast from time_t to int to avoid a Coverity false positive.
...
The cast should not be required.
2022-08-18 10:21:14 -06:00
Todd C. Miller
3dc8497b48
Add additional PVS-studio suppression comments for generated code.
2022-07-08 10:53:00 -06:00
Todd C. Miller
13672f28df
Make sudo pass -Wwrite-strings
2022-06-28 16:33:15 -06:00
Todd C. Miller
f5ac1317c4
Make sudo pass -Wmissing-prototypes
2022-06-27 12:48:03 -06:00
Todd C. Miller
8aec6c2a8d
Quiet a clang analyzer false positive.
2022-01-06 10:53:01 -07:00
Todd C. Miller
de7171ab6c
Quiet a clang analyzer false positive.
2022-01-05 17:34:18 -07:00
Todd C. Miller
18f1884ddc
Use gmtime_r() and localtime_r() instead of gmtime() and localtime().
2021-09-17 10:55:06 -06:00
Todd C. Miller
ecc3aeffc6
Some POSIX yacc fixes for bison 3.8
...
yyerror() must be extern void
declare tokens with type instead of using separate %type lines
2021-09-13 09:33:07 -06:00
Todd C. Miller
4e11bc0e26
Suppress PVS Studio false positives.
2021-01-06 14:27:09 -07:00
Todd C. Miller
88dcdcd11d
Fix -Wshadow warnings.
2020-09-25 15:09:45 -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
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
a885b952fb
Remove use of AC_HEADER_TIME, only obsolete platforms actually
...
need this. Also stop removing sys/time.h unless the source file
uses struct timeval.
2018-01-17 09:52:15 -07: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
2033be83c6
Regen with yacc skeleton that the clang analyzer doesn't complain about.
2015-02-03 15:58:09 -07:00
Todd C. Miller
a9bf105eda
Use stdint.h to get SIZE_MAX as inttypes.h on some pre-C99 HP-UX
...
systems doesn't include stdint.h itself.
2015-02-03 10:00:30 -07:00
Todd C. Miller
47835ff289
Rename missing.h -> sudo_compat.h
2014-07-22 14:25:16 -06:00
Todd C. Miller
ffbe7d1dae
Include limits.h and inttypes.h for SIZE_MAX define.
2014-05-01 09:51:49 -06:00
Todd C. Miller
ae6fb933f0
Do not assume localtime(), gmtime() and ctime() always return non-NULL.
2014-01-21 16:32:00 -07:00
Todd C. Miller
99b7351de0
Fix some #if vs. #ifdef and remove an extraneous semicolon.
...
Bug #624 ; from Daniel Richard G.
2013-11-17 16:15:36 -07:00
Todd C. Miller
e8dac0e4ab
regen
2013-11-04 10:30:12 -07:00
Todd C. Miller
8e503a229f
Fix warnings from -Wold-style-definition
2013-11-04 06:26:37 -07:00
Todd C. Miller
1202e54cd9
Fix sign comparison warning.
2013-10-30 14:27:50 -06:00
Todd C. Miller
07a804caf3
Quiet sign comparision warnings.
2013-10-23 15:03:31 -06:00
Todd C. Miller
9a657e884d
Change "next" back to 2. In the context of "next Friday" we really
...
do want the friday of the upcoming (not current) week. Unfortunately,
this means that things like "next week" and "next year" will match
one more than we really want. Fixing this will require some fairly
major changes to the grammar.
2013-09-18 11:48:26 -06:00
Todd C. Miller
e59d5624d9
Make "this" and "next" qualifiers work a bit better. There is still
...
room for improvement as "this week" will use the current time instead
of the beginning of the week. That's a separate issue though.
2013-09-09 16:41:27 -06:00
Todd C. Miller
d32cb3d659
Only check year against 2038 if time_t is 32-bit.
2013-04-17 09:31:26 -04:00
Todd C. Miller
12422f928c
Quiet a clang-analyzer false positive.
2012-03-27 13:01:45 -04:00
Todd C. Miller
a1815e17ca
Replace y.tab.c with the correct filename in #line directives.
2012-01-04 15:35:49 -05:00
Todd C. Miller
2c4a5e905c
Do not declare yyparse() static as the actual function generated
...
by yacc is extern.
2011-06-07 11:45:06 -04:00
Todd C. Miller
39d1167f33
Include config.h before any other includes to make sure we get the
...
right value for _FILE_OFFSET_BITS.
2010-11-09 08:55:55 -05: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
41b15ae81e
Quiet a compiler warning.
2010-06-18 18:39:40 -04:00
Todd C. Miller
848b636f24
Quiet a compiler warning.
2010-06-14 10:56:01 -04:00
Todd C. Miller
c6371aa481
Silence some compiler warnings
2010-06-10 12:27:18 -04:00
Todd C. Miller
d346e50903
Use angle brackets when including headers that can only be found when
...
an -I flag is specified. The files in the compat dir could get away
with double quotes here but I've converted all the source files
to use angle brackets for consistency.
2010-04-30 15:13:47 -04:00
Todd C. Miller
d5ae4c7d87
Kill __P in sudoers
2010-03-17 19:56:27 -04:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00