Skip to content

Commit

Permalink
Add basic support for 32-bit and 64-bit LD_PRELOAD equivalents.
Browse files Browse the repository at this point in the history
The noexec and intercept DSO settings may now include both a 32-bit
DSO and a 64-bit DSO specified by a colon.  For example:
/usr/libexec/sudo/sudo_intercept.so:/usr/libexec/sudo/sudo_intercept_64.so.
  • Loading branch information
millert committed Jul 31, 2023
1 parent 7cb1f7f commit 980e021
Show file tree
Hide file tree
Showing 7 changed files with 439 additions and 195 deletions.
32 changes: 19 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,24 +434,30 @@ Defaults are listed in brackets after the description.
This is also used to support the "log_subcmds" sudoers
setting. For example, this means that for a shell run
through sudo, the individual commands run by the shell are
also subject to rules in the sudoers file. See the
"Preventing Shell Escapes" section in the sudoers man page
for details. If specified, PATH should be a fully qualified
path name, e.g. /usr/local/libexec/sudo/sudo_intercept.so.
If PATH is "no", intercept support will not be compiled in.
The default is to compile intercept support if libtool
supports building shared objects on your system.
also subject to rules in the sudoers file. See the "Preventing
Shell Escapes" section in the sudoers man page for details.
If specified, PATH should either be a fully-qualified path
name such as /usr/local/libexec/sudo/sudo_intercept.so, or,
for AIX and Solaris systems, it may optionally be set to a
32-bit shared library followed by a 64-bit shared library,
separated by a colon. If PATH is "no", intercept support
will not be compiled in. The default is to compile intercept
support if libtool supports building shared objects on your
system.

--with-noexec[=PATH]
Enable support for the "noexec" functionality which prevents
a dynamically-linked program being run by sudo from executing
another program (think shell escapes). See the "Preventing
Shell Escapes" section in the sudoers man page for details.
If specified, PATH should be a fully qualified path name,
e.g. /usr/local/libexec/sudo/sudo_noexec.so. If PATH is
"no", noexec support will not be compiled in. The default
is to compile noexec support if libtool supports building
shared objects on your system.
If specified, PATH should either be a fully-qualified path
name such as /usr/local/libexec/sudo/sudo_noexec.so, or,
for AIX and Solaris systems, it may optionally be set to a
32-bit shared library followed by a 64-bit shared library,
separated by a colon. If PATH is "no", noexec support
will not be compiled in. The default is to compile noexec
support if libtool supports building shared objects on your
system.

--with-selinux
Enable support for role based access control (RBAC) on systems
Expand Down Expand Up @@ -836,7 +842,7 @@ Defaults are listed in brackets after the description.
Sudoers option: exempt_group

--with-fqdn
Define this if you want to put fully qualified host names in the sudoers
Define this if you want to put fully-qualified host names in the sudoers
file. Ie: instead of myhost you would use myhost.mydomain.edu. You may
still use the short form if you wish (and even mix the two). Beware
that turning FQDN on requires sudo to make DNS lookups which may make
Expand Down
11 changes: 11 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,14 @@
/* The environment variable that controls preloading of dynamic objects. */
#undef RTLD_PRELOAD_VAR

/* The environment variable that controls preloading of 32-bit dynamic
objects. */
#undef RTLD_PRELOAD_VAR_32

/* The environment variable that controls preloading of 64-bit dynamic
objects. */
#undef RTLD_PRELOAD_VAR_64

/* The user sudo should run commands as by default. */
#undef RUNAS_DEFAULT

Expand Down Expand Up @@ -1286,6 +1294,9 @@
/* The size of 'id_t', as computed by sizeof. */
#undef SIZEOF_ID_T

/* The size of 'long', as computed by sizeof. */
#undef SIZEOF_LONG

/* The size of 'long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG

Expand Down
Loading

0 comments on commit 980e021

Please sign in to comment.