Commit Graph

9484 Commits

Author SHA1 Message Date
Todd C. Miller
731e796711 Fix the counting of supplementary groups on AIX.
We should not assume that basegid will be present in the list of
gids returned by getgrset().
2019-03-18 14:08:21 -06:00
Todd C. Miller
194968eaf0 Plug a memory leak on user/group lookup failure found by ASAN. 2019-03-14 11:31:05 -06:00
Todd C. Miller
e31ac5a998 Fix test failure when run by a user other than the file owner. 2019-03-08 09:07:20 -07:00
Todd C. Miller
28b0bff4f3 Updated translations from translationproject.org 2019-03-08 08:36:01 -07:00
Todd C. Miller
0c31cf15fe Test cvtsudoers stdout and stderr separately.
Fixes a test failure on systems with musl libc.  Bug #873
2019-03-08 06:58:30 -07:00
Todd C. Miller
0766e0c647 Better comment about EOVERFLOW and pstat_getproc().
Also remove some useless casts.
2019-03-06 20:15:11 -07:00
Todd C. Miller
17ca31c381 Ignore EOVERFLOW from pstat_getproc(), it is not a fatal error.
It just means that one of the fields in pstat lacks the precision to
store a value.  That's not an issue for pst_highestfd.
2019-03-06 20:13:40 -07:00
Todd C. Miller
9c4487b732 update copyright year 2019-03-06 10:46:23 -07:00
Todd C. Miller
8ee2de9980 Fix error message when a fully-qualified plugin path does not exist. 2019-03-05 10:23:07 -07:00
Todd C. Miller
0e8fffdb30 Fix unescaped '\' and remove an extra '[' in the definition of digest. 2019-03-04 08:52:28 -07:00
Todd C. Miller
ea3ede690f Ignore carriage return before a linefeed.
This allows sudo to parse files with DOS-style line endings.
2019-03-03 14:41:59 -07:00
Todd C. Miller
f4853cb754 For sssd, the nsswitch.conf setting should be "sss" not "sssd".
From Johnathan Smith.
2019-02-26 13:15:40 -07:00
Todd C. Miller
e1205f08d6 Add simple API for to allow reading environment data from different sources.
Currently, this is used to read a file like /etc/environment.
2019-02-20 17:05:02 -07:00
Todd C. Miller
f3344b5881 Fix pasto; the unrestricted env file was read when we want the restricted one. 2019-02-19 11:03:02 -07:00
Todd C. Miller
c0a12d9d95 Be sure to include sudo_queue.h where needed instead of relying on other headers. 2019-02-19 08:31:08 -07:00
Todd C. Miller
683c65b98b Only export sudo_arc4random_uniform() if arc4random_uniform() is missing. 2019-02-18 16:03:55 -07:00
Todd C. Miller
f17683482b Quiet a warning on gcc 8 2019-02-18 15:56:12 -07:00
Todd C. Miller
da98428e91 AIX 7.1 defines O_CLOEXEC but it can't be used outside the kernel.
Redefine O_CLOEXEC if it doesn't fit in an int and pipe2() is missing.
2019-02-18 15:45:31 -07:00
Todd C. Miller
36d4373403 Split command match code out into match_command.c.
Also remove unused SUDOERS_NAME_MATCH code.
2019-02-18 11:35:52 -07:00
Todd C. Miller
cf2bfbcd3f Split out digest matching into its own file. 2019-02-17 08:21:13 -07:00
Todd C. Miller
a04409747c Split out digest matching into its own file. 2019-02-17 06:47:37 -07:00
Todd C. Miller
1e6e048180 Rename FOLLOW and NOFOLLOW tokens FOLLOWLNK and NOFOLLOWLNK.
Fixes a namespace collision on Solaris when bison is used.
2019-02-12 12:02:02 -07:00
Todd C. Miller
bc25915050 Add stub definition of digest_matches() for SUDOERS_NAME_MATCH 2019-02-06 13:12:33 -07:00
Todd C. Miller
694999487b No longer need to include sudo_lbuf.h 2019-02-06 10:25:52 -07:00
Todd C. Miller
ffc4db6aee On RedHat/CentOS get the OS major version from /etc/redhat-release.
We cannot determine this from the output of "pp --probe" since it
doesn't contain a period to separate the major and minor numbers.
2019-02-06 06:30:00 -07:00
Todd C. Miller
6dceca47cc Use SET macro instead of bitwise OR. 2019-02-05 16:47:08 -07:00
Todd C. Miller
c92f80b79e In sudo_make_grlist_item() the calculation of total did not include
space for pointers to the group names.
2019-02-05 16:46:30 -07:00
Todd C. Miller
4f74fe3a8e Use correct debug_decl() names. 2019-02-05 14:29:39 -07:00
Todd C. Miller
928faf27f2 Add fallback values for sudoers uid, gid and mode if not set in Makefile. 2019-02-05 10:02:17 -07:00
Todd C. Miller
13c3244220 include stddef.h to make sure we get NULL 2019-02-04 14:07:20 -07:00
Todd C. Miller
3788c65483 Fix memory leak when there are no network interfaces or an error occurs. 2019-02-02 13:55:30 -07:00
Todd C. Miller
c1d934894d Use $ac_cv_search_FUNCTION instead of $ac_lib and $ac_res.
Fixes a problem where libcrypt is not used with autoconf caching.
Adapted from a diff from Adam Labbe.
2019-01-25 10:39:57 -07:00
Todd C. Miller
df8b855b2a Updated translations from translationproject.org 2019-01-24 14:59:13 -07:00
Todd C. Miller
ecc9c366e4 Fix listpw=never and verifypw=never. Bug #869 2019-01-22 06:41:16 -07:00
Todd C. Miller
985600e7f0 Minor snprintf() usage tweaks:
1) don't assume snprintf() returns -1 on error, check for <0
2) when comparing return value of sizeof(foo), cast the sizeof, not the len
3) cast return value to void in cases where snprintf cannot fail
2019-01-20 07:49:48 -07:00
Todd C. Miller
3d63eee344 The AIX nofiles hard limit fix and bug #867 will make 1.8.27. 2019-01-07 11:01:21 -07:00
Todd C. Miller
e2675d8f1e Use PAM_SILENT to prevent pam_lastlog from printing last login
information on RedHat except when explicitly running a shell.
Adapted from a patch from Nir Soffer.  Bug #867
2019-01-07 09:50:40 -07:00
Todd C. Miller
f7d7a9a619 Fix the default nofiles and stack hard limits.
The table of default hard limits in /etc/security/limits was out
of date with respect to the current documentation.  The default
hard limit for nofiles should be unlimited, not 8196.  The default
hard limit for stack should be 4194304 blocks (which fits in an
unsigned long on 32-bit platforms).
2019-01-07 09:38:03 -07:00
Todd C. Miller
32dc90c28e regen 2019-01-03 13:26:57 -07:00
Todd C. Miller
7ae29420d5 Final updates for sudo 1.8.27. 2019-01-03 13:16:57 -07:00
Todd C. Miller
64d08d8bf2 Update copyright year 2019-01-03 11:09:00 -07:00
Todd C. Miller
de94a04ba4 Update for 2019 2019-01-03 11:05:46 -07:00
Todd C. Miller
b2f7983c84 Fix setting of utmp entry when running command in a pty.
Regression introduced in sudo 1.8.22.
2019-01-02 07:39:33 -07:00
Todd C. Miller
efe35e5b1e Use debug_return_int not debug_return_bool in resolve_host 2018-12-24 20:31:26 -07:00
Todd C. Miller
24b0da367b sudo 1.8.27 2018-12-24 10:09:35 -07:00
Todd C. Miller
dc9338ffe7 Allow the sudoers file to be specified without the -f option.
Bug #864
2018-12-24 08:26:18 -07:00
Todd C. Miller
7d5b0064af The iolog_dir section is below the maxseq section, not above. 2018-12-20 06:57:05 -07:00
Todd C. Miller
3d84150736 Updated translations from translationproject.org 2018-12-12 10:47:01 -07:00
Todd C. Miller
72050203bc Add -n and -R options to help; reported by Radovan Sroka 2018-12-11 09:17:15 -07:00
Todd C. Miller
258c7d4dd0 Add missing description of padding option and missing argument to -c. 2018-12-11 09:12:06 -07:00