Todd C. Miller
dfc32e5b3e
Disable stringop-truncation false positive warnings on gcc 8.
...
Strings in struct utmp/utmpx are not guaranteed to be NUL-terminated.
2019-07-30 12:42:07 -06:00
Todd C. Miller
aa200cda6a
Replace non-essential strncpy() calls.
2019-07-30 11:37:26 -06:00
Todd C. Miller
aa73c86a5b
Revert version back to 1.8.28
2019-07-26 15:14:52 -06:00
Todd C. Miller
e91865fb22
Link util functions being tested directly with the test harness.
...
Otherwise we may get the version from the installed libsudo_util.so.
2019-07-26 15:09:13 -06:00
Todd C. Miller
7117948421
Updated translations from translationproject.org
2019-07-23 08:16:22 -06:00
Todd C. Miller
5e424640b9
Use strftime(3) instead of formatting struct tm by hand.
...
Fixes a warning on newer versions of gcc.
2019-07-19 20:14:44 -06:00
Todd C. Miller
6f3d826f8b
Update error message when the password cannot be read from the terminal.
2019-07-19 17:46:57 -06:00
Todd C. Miller
f634241110
Fix for Bug #888
2019-07-19 14:10:57 -06:00
Todd C. Miller
a7137a5225
If the command in sudoers does not exist on the file system, match by name.
...
We still want to match the command even if it doesn't exist so that the
NOPASSWD flag on sudoers entries with non-existant paths works as expected.
Bug #888 .
2019-07-19 13:51:23 -06:00
Todd C. Miller
15db0c3f82
More verbose error message when a password is required and no terminal
...
is present. Bug #828 .
2019-07-19 11:51:20 -06:00
Todd C. Miller
3c825e298d
regen
2019-07-19 10:42:50 -06:00
Todd C. Miller
6e0f7166e3
Document that PAM session modules are now run with the silent flag.
2019-07-19 10:38:53 -06:00
Todd C. Miller
c49760e55d
Simpler change to retry sudo_secure_file() as root as needed.
2019-07-14 19:37:33 -06:00
Todd C. Miller
cecf69ff3c
If we are unable to stat() sudoers as non-root, try again as root.
...
By default, sudo relies soley on group permissions to read sudoers
to make it possible to store sudoers on NFS. However, if /etc/sudoers
is not accessible to non-root uids for some reason, sudo will fail.
Bug #880 .
2019-07-14 18:51:50 -06:00
Todd C. Miller
10b5529a0b
Clarify that ttyin contains raw terminal input.
2019-07-12 08:24:07 -06:00
Todd C. Miller
03ba6426e7
Expand the description of the I/O log files.
2019-07-11 13:42:12 -06:00
Todd C. Miller
679f13ef53
Remove trailing whitespace.
2019-07-11 13:41:48 -06:00
Todd C. Miller
bb024cf093
Rename PLUGINDIR -> plugindir
2019-07-03 13:15:47 -06:00
Todd C. Miller
caceced2f5
Use $libexecdir in default settings used by the documentation.
...
The web and pdf pages will substitute /usr/local/libexec for $noexec_file.
Also do substitution of variables using exec_prefix even if we don't use
them in the Makefile since the documentation may reference them.
2019-07-03 13:13:04 -06:00
Todd C. Miller
cd258e1d39
Add conditional for sesh path in sudo.conf manual.
2019-07-03 09:06:45 -06:00
Todd C. Miller
6e497be935
Update plugindir even when --disable-shared is specified.
...
Otherwise, the default value is substituted into the Makefiles and
documentation which may not match --prefix. Bug #886
2019-07-03 07:39:54 -06:00
Todd C. Miller
9d8f374397
Add ssizeof macro that returns ssize_t.
...
We can use this instead of casting the result of size_t to int.
Also change checks for snprintf() returning <=0 to <0.
2019-06-25 09:45:10 -06:00
Todd C. Miller
81602ad086
sudoedit should be used for editing files instead of "sudo editor"
...
That way the user's editor config files are used by the editor.
2019-06-21 14:54:09 -06:00
Todd C. Miller
1fe9644f54
Move the section on HOME to be after the environment section.
...
Also strongly discourage the disabling of env_reset.
2019-06-21 13:26:02 -06:00
Todd C. Miller
2d8949198d
Remove the Solaris last login question, add one about HOME.
...
The PAM session is opened with PAM_SILENT so last login info is not printed.
It is dangerous to preserve HOME from the user's environment.
2019-06-20 21:49:11 -06:00
Todd C. Miller
a45732528b
Use the term pseudo-terminal more consistently.
2019-06-20 16:52:49 -06:00
Todd C. Miller
ee214e5261
Document why HOME should not be preserved from the user's environment.
...
Text was adapted from what is already present in the UPGRADE file.
Also mark set_home and always_set_home as obsolete.
2019-06-20 16:32:18 -06:00
Todd C. Miller
e11fa62cdc
Refer to command line options, not flags.
2019-06-20 16:12:32 -06:00
Todd C. Miller
646f09d74d
sync
2019-06-20 14:14:03 -06:00
Todd C. Miller
c1fc4e6bec
sudo will now prompt for a password as long as /dev/tty is available.
2019-06-20 14:03:03 -06:00
Todd C. Miller
71fdb8e037
Remove .cat pages, there is no need for them in the modern world.
...
Sudo only shipped .cat pages for Irix, which lacked nroff.
Irix is long dead and there are multiple open source nroff options.
2019-06-20 13:15:46 -06:00
Todd C. Miller
184484b213
Make env_editor the default.
...
It is already the default in the package script.
2019-06-20 11:51:47 -06:00
Todd C. Miller
958cf7e37f
Don't describe env_editor as a security hole.
...
Users that are able to edit sudoers can grant themselves permissions
so the fact that visudo runs the editor as root is not a security issue.
2019-06-20 11:40:47 -06:00
Todd C. Miller
6fe2223298
Fix details of how EDITOR, VISUAL and SUDO_EDITOR are (or are not) preserved.
...
The description in the editor option was incorrect and didn't mention env_keep.
Reported by Sander Bos
2019-06-20 11:05:15 -06:00
Todd C. Miller
a193f39c83
Modern visudo locks the actual sudoers file, not the sudoers.tmp file.
...
Refer to sudoers.tmp as a temporary file, not a lock file.
Reported by Sander Bos
2019-06-20 10:11:26 -06:00
Todd C. Miller
29223d7f64
In tty_present(), check for /dev/tty if sudo was unable to get the tty name.
...
For requiretty it is enough to check that /dev/tty is available.
If sudo can't get the tty from the kernel (missing /proc?) that is OK.
2019-06-19 20:32:22 -06:00
Todd C. Miller
82920726fa
Don't refuse to use the tty unless /dev/tty is unavailable.
...
We don't care whether sudo was able to get the tty name from the kernel.
All that really matters is whether we are able to disable echo as needed.
2019-06-19 20:29:08 -06:00
Todd C. Miller
7ce9b80085
Use of "they" was ambiguous.
2019-06-19 14:36:59 -06:00
Todd C. Miller
05f9643b89
Better description of secure_path.
...
The secure_path option affects the resolution of unqualified commands
as well as the environment that commands run with.
2019-06-19 14:29:25 -06:00
Todd C. Miller
0304416099
Add Sander Bos
2019-06-19 14:02:56 -06:00
Todd C. Miller
7d5b1e3b1b
Fix a few typos and awkward wording.
...
Use the singular "they" instead of he/she.
Add back missing text in description of variables starting with ().
Based on changes from Sander Bos.
2019-06-19 14:02:16 -06:00
Todd C. Miller
cb4ded8fb6
Clarify which environment variables are set based on the target user.
2019-06-15 09:41:39 -06:00
Todd C. Miller
5d4142f294
libsudo_util depends on LT_DEP_LIBS even when building a static lib
2019-06-10 13:27:12 -06:00
Todd C. Miller
81c6cac81b
Solaris getentropy() requires that sys/random.h be included.
2019-06-10 12:12:57 -06:00
Todd C. Miller
12c29e91bd
Use the runhost for "User foo is not allowed to run sudo on bar."
...
Otherwise, if the -h option is specified sudo will print the local
host name instead of the host specified via -h.
2019-05-29 15:26:57 -06:00
Todd C. Miller
948007e771
Document that "no tty present and no askpass program specified" may
...
happen when /proc is not accessible.
2019-05-28 08:42:26 -06:00
Todd C. Miller
d63fe33d1f
Add Sangamesh Mallayya and Michael Spradling
2019-05-27 08:51:06 -06:00
Todd C. Miller
19c548fd57
Add -B option to ring the bell before the password prompt.
2019-05-27 08:49:43 -06:00
Todd C. Miller
dae484213e
Allow the user to change their password if expired on AIX.
...
Bug #883
2019-05-27 06:35:48 -06:00
Todd C. Miller
07ed5b86f2
When using AIX auth, don't display the AIX password incorrect message.
...
Avoids a "3004-300 You entered an invalid login name or password"
message in addition to sudo's own "Sorry, try again" message.
2019-05-26 16:29:08 -06:00