diff options
| author | Paul Eggert | 2012-10-19 09:52:02 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-10-19 09:52:02 -0700 |
| commit | e752e0b0a2622d8d0ba518bf81f6fa652d926e67 (patch) | |
| tree | 3b7cfbf8aa3ecaa587cd6fbc2d17b64d055d2b07 /src/Makefile.in | |
| parent | 6ec83f926d5ff699901fb530162d7f1bdfa85808 (diff) | |
| download | emacs-e752e0b0a2622d8d0ba518bf81f6fa652d926e67.tar.gz emacs-e752e0b0a2622d8d0ba518bf81f6fa652d926e67.zip | |
Use faccessat, not access, when checking file permissions.
* .bzrignore: Add lib/fcntl.h.
* configure.ac (euidaccess): Remove check; gnulib does this for us now.
(gl_FCNTL_O_FLAGS): Define a dummy version.
* lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
* lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
* lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
* m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add faccessat.
(GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
openat-die, openat-h, save-cwd. Do not avoid fcntl-h.
Omit gnulib's m4/fcntl-o.m4.
* nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
(access): Remove.
(faccessat): New macro.
* src/Makefile.in (LIB_EACCESS): New macro.
(LIBES): Use it.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/fileio.c (check_existing, check_executable):
* src/lread.c (openp, load_path_check):
* src/process.c (allocate_pty):
* src/xrdb.c (file_p):
Use faccessat, not access or euidaccess. Use symbolic names
instead of integers for the flags, as they're portable now.
* src/charset.c, src/xrdb.c: Include <fcntl.h>, for the new flags used.
* src/fileio.c (Ffile_readable_p):
Use faccessat, not stat + open + close.
(file_directory_p): New function, which uses 'stat' on most places
but 'access' (for efficiency) if WINDOWSNT.
* src/fileio.c (Ffile_directory_p, Fset_file_times):
* src/xrdb.c (file_p): Use file_directory_p.
* src/lisp.h (file_directory_p): New decl.
* src/lread.c (openp): When opening a file, use fstat rather than
stat, as that avoids a permissions race. When not opening a file,
use file_directory_p rather than stat.
* src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
changed to '#if O_NONBLOCK', to accommodate gnulib O_* tyle.
* src/w32.c (sys_faccessat): Rename from sys_access and switch to
faccessat's API. All uses changed.
Fixes: debbugs:12632
Diffstat (limited to 'src/Makefile.in')
| -rw-r--r-- | src/Makefile.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index c24e421bbbc..d034ad04796 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -150,6 +150,7 @@ M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ | |||
| 150 | M17N_FLT_LIBS = @M17N_FLT_LIBS@ | 150 | M17N_FLT_LIBS = @M17N_FLT_LIBS@ |
| 151 | 151 | ||
| 152 | LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ | 152 | LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ |
| 153 | LIB_EACCESS=@LIB_EACCESS@ | ||
| 153 | LIB_TIMER_TIME=@LIB_TIMER_TIME@ | 154 | LIB_TIMER_TIME=@LIB_TIMER_TIME@ |
| 154 | 155 | ||
| 155 | DBUS_CFLAGS = @DBUS_CFLAGS@ | 156 | DBUS_CFLAGS = @DBUS_CFLAGS@ |
| @@ -392,7 +393,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ | |||
| 392 | LIBES = $(LIBS) $(W32_LIBS) $(LIBX_BASE) $(LIBIMAGE) \ | 393 | LIBES = $(LIBS) $(W32_LIBS) $(LIBX_BASE) $(LIBIMAGE) \ |
| 393 | $(LIBX_OTHER) $(LIBSOUND) \ | 394 | $(LIBX_OTHER) $(LIBSOUND) \ |
| 394 | $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \ | 395 | $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \ |
| 395 | $(LIB_TIMER_TIME) $(DBUS_LIBS) \ | 396 | $(LIB_EACCESS) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ |
| 396 | $(LIB_EXECINFO) \ | 397 | $(LIB_EXECINFO) \ |
| 397 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ | 398 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ |
| 398 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ | 399 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ |