Todd C. Miller
bff4e3ce16
set_cmnd_path: apply runchroot if set when finding the command path
...
Previously we would prepend runchroot to the path we were checking
but that does not properly handle symbolic links.
2023-02-21 13:24:33 -07:00
Todd C. Miller
4e11bc0e26
Suppress PVS Studio false positives.
2021-01-06 14:27:09 -07:00
Todd C. Miller
b6dbfe5094
Take the chroot into account when search for the command.
...
This could a a user-specific chroot via the -R option, a runchroot
Defaults value, or a per-command CHROOT spec in the sudoers rule.
2020-09-09 15:26:44 -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
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
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
8133cdfdf6
Use sys/stat.h defines instead of bare octal values.
2016-11-07 13:36:05 -07:00
Todd C. Miller
3f022419ae
Be consistent with the naming of the variable used to store the
...
function return value. Previously, some code used "rval", some
used "ret". This standardizes on "ret" and uses "rc" for temporary
return codes.
2016-09-08 16:38:08 -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
ac13264b44
Use a common function for resolviong the user's editor in sudoedit
...
and visudo. The find_path() function now returns a dynamically
allocated path instead of using a static string.
2015-06-18 09:51:36 -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
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
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
21a2f95821
Use stdbool.h instead of rolling our own TRUE/FALSE macros.
2011-12-02 11:27:33 -05:00
Todd C. Miller
c189fa5f55
Don't write to sbp if it is NULL
2011-11-17 16:33:32 -05:00
Todd C. Miller
f3ae31185b
Make sudo_goodpath() return value bolean
2011-11-13 12:11:00 -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
53da5e8cdf
Update copyright years.
2011-03-11 15:34:35 -05:00
Todd C. Miller
ae2f7638f5
standardize on "return foo;" rather than "return(foo);" or "return (foo);"
2011-01-24 15:15:18 -05: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
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00
Todd C. Miller
05ae3ea6cb
Convert to ANSI C function declarations
2010-04-22 18:09:53 -04:00
Todd C. Miller
9b0205846b
Initial bits of sudoers plugin; still needs work.
2010-03-14 19:58:47 -04:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00