Rewritten sudoedit_checkdir support that checks all the dirs in the

path and refuses to follow symlinks in writable directories.
This is a better fix for CVE-2015-5602.
Adapted from a diff by Ben Hutchings.  Bug #707
This commit is contained in:
Todd C. Miller
2016-01-10 18:31:29 -07:00
parent 39db87e62b
commit 68c1073fe5
7 changed files with 187 additions and 72 deletions

View File

@@ -182,6 +182,8 @@
# ifndef UTIME_NOW
# define UTIME_NOW -2L
# endif
#endif
#if !defined(HAVE_OPENAT) || (!defined(HAVE_FUTIMENS) && !defined(HAVE_UTIMENSAT))
# ifndef AT_FDCWD
# define AT_FDCWD -100
# endif