Todd C. Miller
eae8bc9d56
Fix typo introduced in last commit to fix fill_args() overflow check.
2016-07-16 20:59:59 -06:00
Todd C. Miller
73b0ac4bc1
Fix underflow checl in fill_args().
2016-07-16 20:54:07 -06:00
Todd C. Miller
88ba54f478
Make sure we account for the trailing NUL when computing arg_size
...
in fill_args(). Bug #752
2016-07-16 20:12:17 -06:00
Todd C. Miller
0f816c4401
Make arg_size and arg_len unsigned since we do bitwise operations
...
on them.
2016-07-16 16:22:40 -06:00
Todd C. Miller
6f5b8cf757
Only remove backup files as part of "make uninstall" when INSTALL_BACKUP
...
is set.
2016-07-08 12:56:47 -06:00
Todd C. Miller
144e3bb53f
Only keep backups of installed files on HP-UX where you cannot
...
unlink a shared library that is in use.
2016-07-08 12:37:41 -06:00
Todd C. Miller
19c80f8aee
Ignore a missing or insecure #includedir, it is not a fatal error.
2016-07-03 06:19:43 -06:00
Todd C. Miller
026b403f27
Make sure we always call sudoerserror() on error in read_dir_files(),
...
otherwise sudo will not treat it as a fatal error.
2016-07-03 06:16:19 -06:00
Todd C. Miller
7bfe2e7969
Set the sudoers locale before opening the sudoers file.
...
Previously the sudoers locale was used when evaluating sudoers
but not during the inital parse. Bug #748
2016-06-30 12:40:19 -06:00
Todd C. Miller
5a176e8509
Add debugging
2016-06-30 12:38:30 -06:00
Todd C. Miller
c56d52ea62
Don't link test programs with the sudoers-specific locale code
...
if we don't need to.
2016-06-30 12:12:18 -06:00
Todd C. Miller
cbd2cf290b
sudoreplay does not need to link with the sudoers-specific locale code.
2016-06-30 11:27:22 -06:00
Todd C. Miller
81e33e1f56
new_digest was prototyped as static but not explicitly declared
...
static.
2016-06-27 06:00:11 -06:00
Todd C. Miller
9c7680e016
Some versions of HP-UX make will ignore suffix rules if they are
...
empty.
2016-06-27 05:48:19 -06:00
Todd C. Miller
f683cbd582
Add definition of nitems for those without it and use it throughout.
2016-06-23 10:58:07 -06:00
Todd C. Miller
72f18cff9a
Fold lines at 80 characters for the clean: target
2016-06-13 15:12:44 -06:00
Todd C. Miller
ea23932af0
sync with translationproject.org
2016-06-12 18:57:09 -06:00
Todd C. Miller
d9e14bc659
LDAP sudoers doesn't support negated users, groups or netgroups.
2016-06-12 09:36:19 -06:00
Todd C. Miller
e2de0027dc
When matching paths with glob(3), check returned matches against
...
user_cmnd first if it is fully-qualified. This avoids a lot of
needless stat(2) calls and avoids a mismatch between safe_cmnd and
argv[0] if there are multiple matches with the same inode/dev due
to links. Bug #746 .
2016-06-09 11:41:09 -06:00
Todd C. Miller
ce28b15eca
sync with translationproject.org
2016-06-09 10:51:40 -06:00
Todd C. Miller
12ab5b8108
sync with translationproject.org
2016-06-09 07:12:38 -06:00
Todd C. Miller
734b43c6b0
regen
2016-06-06 10:07:58 -06:00
Todd C. Miller
3169259821
Ignore empty ipa_hostname
2016-06-05 14:42:54 -06:00
Todd C. Miller
c6a21bd53d
Better martching of ipa_hostname in sssd.conf
2016-06-05 05:40:32 -06:00
Todd C. Miller
9b027676c0
Use the value of ipa_hostname from /etc/sssd/sssd.conf if present
...
instead of the system hostname.
2016-06-04 19:52:10 -06:00
Todd C. Miller
ccf88d3bb2
When matching host, short-circuit the loop when we get a match.
...
Only check username as part of the netgroup when netgroup_tuple is
enabled.
2016-06-03 14:07:40 -06:00
Todd C. Miller
a71cac91f2
Avoid using !strcmp()
2016-06-03 13:58:12 -06:00
Todd C. Miller
b6beccf19e
SSSD doesn't handle netgroups, we have to ensure they are correctly filtered
...
in sudo. The rules may contain mixed sudoUser specification so we have to
check not only for netgroup membership but also for user and group matches.
Adapted from a patch from Daniel Kopecek.
2016-06-02 10:47:39 -06:00
Todd C. Miller
a24f4b8248
Return PAM_CONV_ERR from the conversation function if getpass returns
...
NULL or the user pressed ^C.
2016-06-01 14:48:31 -06:00
Todd C. Miller
7a35bab8c8
Make base64 decoding table-driven.
2016-06-01 12:43:02 -06:00
Todd C. Miller
fc517ba9f8
Back out cfa26b99228f, it was already fixed differently.
...
Caught by regress checks.
2016-06-01 12:38:53 -06:00
Todd C. Miller
6c3c03ea26
Allow double-quoted groups and netgroups to be part of a Defaults spec.
...
From Daniel Kopecek.
2016-05-31 13:50:38 -06:00
Todd C. Miller
461a419d04
For sudo -ll (long list) print the SSSD role just like we do
...
for the LDAP backend. Adapted from sudo-1.8.6p3-sssdrulenames.patch
2016-05-31 13:07:31 -06:00
Todd C. Miller
db2c732931
sudo_version should be unsigned
2016-05-25 08:44:53 -06:00
Todd C. Miller
4d36fbec2f
sync with translationproject.org
2016-05-25 08:41:45 -06:00
Todd C. Miller
63dbb74250
Korean translation for sudo and sudoers from translationproject.org.
2016-05-25 08:41:27 -06:00
Todd C. Miller
5e1084c08a
Ignore PAM_SESSION_ERR from pam_open_session() since this can
...
apparently happen on systems using Solaris-derived PAM. Other
errors from pam_open_session() are treated as fatal. This avoids
the "policy plugin failed session initialization" error message
seen on some systems.
2016-05-25 08:33:57 -06:00
Todd C. Miller
58ffab1dfa
There's no need to escape forward slashes in JSON output. While
...
it is legal to escape a forward slash, it is not required.
2016-05-23 11:29:17 -06:00
Todd C. Miller
eb4510597b
Don't try to fflush(export_fp) or ferror(export_fp) if export_fp
...
is NULL, which can happen on the error path.
2016-05-16 14:16:08 -06:00
Todd C. Miller
a2e541aef8
O_NOCTTY has no effect when opening /dev/tty as the open can only
...
succeed if there is already a controlling tty.
2016-05-16 11:17:20 -06:00
Todd C. Miller
b9dde14808
No need to set pass to NULL after freeing at the end of the loop
...
it since it is already set to NULL each time through the loop.
2016-05-16 10:18:31 -06:00
Todd C. Miller
787912fa91
Check fprintf() return value in writeln_wrap() and return the number
...
of characters actually written, or -1 on error.
2016-05-14 19:38:23 -06:00
Todd C. Miller
9d526c1af5
Do not write directly to stdout/stderr, use sudo_printf which calls
...
the conversation function.
2016-05-14 19:34:13 -06:00
Todd C. Miller
90fdb6a316
Do not write directly to stdout/stderr, use sudo_printf which calls
...
the conversation function.
2016-05-14 19:33:28 -06:00
Todd C. Miller
578af5af4d
Use ferror() after fflush() to check the error status of the stdio
...
stream we wrote to.
2016-05-14 18:48:20 -06:00
Todd C. Miller
6d63ed8a92
printf() returns < 0 on error, not explicitly -1
2016-05-13 14:48:00 -06:00
Todd C. Miller
4f46e07209
Avoid adding an extraneous warning string to sudoers.pot.
2016-05-12 10:33:32 -06:00
Todd C. Miller
b0be9895d9
Now that pam_open_session() failure is fatal we should print and log
...
an error from it. Bug #744
2016-05-11 15:01:45 -06:00
Todd C. Miller
05db5aa3b8
Remove sudo_mkpwcache() and sudo_mkgrcache(). We now create the
...
caches as needed on demand. Also remove calls to sudo_freepwcache()
and sudo_freegrcache() that are immediately followed by execve(),
they are not needed.
2016-05-11 09:40:31 -06:00
Todd C. Miller
23d288563e
Eliminate use of setpwent()/endpwent() and setgrent()/endgrent().
...
Sudo never iterates over the passwd or group file.
Rename sudo_set{pw,gr}ent() -> sudo_mk{pw,gr}cache() and
use sudo_free{pw,gr}cache() instead of sudo_end{pw,gr}ent().
2016-05-11 07:06:45 -06:00