| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
open().
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
| |
* lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after
copying a directory.
|
|
|
|
|
|
|
|
| |
OS/2 kLIBC provides a function to retrive a path from a fd. Use it
instead of /proc/self/fd.
* lib/openat-proc.c (openat_proc_name):
Don't assume file name length is less than INT_MAX.
Port to OS/2 kLIBC with __libc_Back_ioFHToPath().
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
| |
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/chown.c, lib/clean-temp.c, lib/copy-file.c, lib/execute.c:
* lib/fsusage.c, lib/gc-gnulib.c, lib/javacomp.c, lib/mountlist.c:
* lib/openat-proc.c, lib/pagealign_alloc.c, lib/progreloc.c:
* lib/spawn-pipe.c:
Do not #undef 'open' and 'close'. AIX 7 does '#define open open64'
and then 'int open64(const char *, int, ...);', which means the
declaration for 'open' gets lost if we later '#undef open'.
Discovered while building grep pretest 2.18.151-1c770 on AIX 7.1,
where the compilation reported the non-fatal error "In function
'openat_proc_name' ... warning: implicit declaration of function
'open'". In this case the error is relatively harmless, but in
other cases it might not be so minor.
|
|
|
|
|
|
| |
I ran 'make update-copyright'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
| |
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
| |
* lib/openat-proc.c (openat_proc_name): Correct the comment.
|
|
|
|
|
| |
* lib/openat-proc.c (openat_proc_name): Add comments,
mostly from Eric Blake.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
open/access/close is cheaper than open/stat/stat/close.
Use O_DIRECTORY for safety.
* lib/openat-proc.c (openat_proc_name): Require that /proc/self/fd
be a directory. Simplify the probe for .. bugs.
* modules/openat (Depends-on): Drop same-inode.
Reported by Bastien ROUCARIES.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a direct (but undocumented) dependency of openat on
xalloc, along with an indirect dependency via save-cwd. It also
removes a dependency of save-cwd on xgetcwd, and thereby
indirectly on xalloc. This change causes the openat substitute
to fall back on save_cwd when memory is tight, and for save_cwd to
fail instead of dying when memory is tight, but that's good enough.
* lib/openat-proc.c: Include stdlib.h (for malloc), not
xalloc.h (for xmalloc).
(openat_proc_name): Use malloc, not xmalloc.
* lib/save-cwd.c (save_cwd): Use getcwd, not xgetcwd.
* modules/save-cwd (Files): Depend on getcwd, not xgetcwd.
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX 2008 specifies a new 'open' flag O_SEARCH, which can be used
when one needs search access to a directory but not read access.
On systems where it is available, it works in some cases where
O_RDONLY does not, namely on directories that are searchable but
not readable, and which need only to be searchable. If O_SEARCH
is not available, fall back to the traditional method of using
O_RDONLY.
* lib/fcntl.in.h (O_SEARCH): #define to O_RDONLY if not defined.
* lib/chdir-long.c (cdb_advance_fd): Use O_SEARCH, not O_RDONLY,
when opening a directory that needs only to be searchable.
* lib/chdir-safer.c (chdir_no_follow): Likewise.
* lib/fts.c (diropen, fts_open, fd_ring_check): Likewise.
* lib/openat-proc.c (openat_proc_name): Likewise.
* lib/openat.c (openat_needs_fchdir): Likewise.
* lib/save-cwd.c (save_cwd): Likewise.
* lib/savewd.c (savewd_save, savewd_chdir): Likewise.
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
| |
|
| |
|
|
|
|
|
|
|
| |
* lib/openat-proc.c (openat_proc_name): Special-case the empty
buffer.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/backupfile.c (includes): Use "dirent--.h", since
numbered_backup can write to stderr during readdir.
* lib/savedir.c (includes): Likewise.
* lib/chdir-long.c (includes): Use "fcntl--.h", since openat
emulation can write to stderr on failure.
* lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat.
* lib/getcwd.c: Document why opendir_safer is unused.
* lib/glob.c: Likewise.
* lib/scandir.c: Likewise.
* lib/openat-proc.c: Likewise, for open_safer.
* modules/backupfile (Depends-on): Add dirent-safer.
* modules/savedir (Depends-on): Likewise.
* modules/fts (Depends-on): Add dirent-safer and openat-safer.
* modules/chdir-long (Depends-on): Add openat-safer.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
| |
|
|
Work around bug in Solaris 10 /proc file system:
/proc/self/fd/NNN/.. isn't the parent directory of
the directory whose file descriptor is NNN. This needs to
be worked around at run time, not compile time, since a
program might be built on Solaris 8, where things work, and
run on Solaris 10.
* openat-priv.h (BUILD_PROC_NAME): Remove. All callers changed
to use the following interface instead:
(OPENAT_BUFFER_SIZE): New macro.
(openat_proc_name): New function.
* at-func.c (AT_FUNC_NAME): Adjust to above changes.
* openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
Likewise.
* openat-proc.c: New file.
[ChangeLog]
* modules/openat (Files): Add lib/openat-proc.c.
(Depends-on): Add same-inode, stdbool.
[m4/ChangeLog]
* openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
|