Commit Graph

23 Commits

Author SHA1 Message Date
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Justus Winter 065957a370 hurd: Handle "pid" magical lookup retry
* hurd/lookup-retry: Include <unistd.h>.
	(__hurd_file_name_lookup_retry): Keep a ref on last result in `lastdir'.
	Release it on return.  Handle "pid" magical lookup retry.
2018-12-28 22:32:12 +01:00
Samuel Thibault 72103e73c9 hurd: Fix O_DIRECTORY | O_NOFOLLOW
Appending / to the path to be looked up would make us always follow a final
symlink, even with O_NOTRANS (since the final resolution is after the
'/').  In the O_DIRECTORY | O_NOFOLLOW case, we thus have to really open
the node and stat it, which we already do anyway, and check for
directory type.

	* hurd/hurdlookup.c (__hurd_file_name_lookup): Do not append '/' to
	path when flags contains O_NOFOLLOW.
	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Return ENOTDIR
	if flags contains O_DIRECTORY and the result is a directory.
2018-03-18 19:43:04 +01:00
Samuel Thibault 489999cc9c hurd: Fix O_NOFOLLOW
The error code documented by POSIX for opening a symlink with O_NOFOLLOW
is ELOOP.

Also, if the translator does not expose symlink as a symlink translator but
as a S_IFLNK file, O_NOFOLLOW needs to return ELOOP too.

	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Return ELOOP
	when opening a symlink with O_NOFOLLOW.
2018-03-18 19:42:17 +01:00
Samuel Thibault f8bee46cc2 hurd: Fix warnings
* hurd/hurd/lookup.h (__hurd_file_name_lookup, hurd_file_name_lookup,
	__hurd_file_name_split, hurd_file_name_split,
	__hurd_directory_name_split, hurd_directory_name_split,
	__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry,
	hurd_file_name_path_lookup): Make lookup function parameter take a
	const char *name instead of char *name.
	* hurd/hurdlookup.c (__hurd_file_name_lookup, __hurd_file_name_split,
	__hurd_directory_name_split): Likewise.
	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
	* hurd/path-lookup.c (hurd_file_name_path_lookup): Likewise.
2018-01-28 16:23:59 +01:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Flavio Cruz e42ce0f45e Fix O_DIRECTORY lookup on trivial translators
* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Do not remove
leading slash when `file_name' is "/".
2016-01-13 00:48:30 +01:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Roland McGrath 4f75b7a09a Distinguish ELOOP diagnosis threshold from SYMLOOP_MAX. 2012-08-03 11:39:30 -07:00
Thomas Schwinge 10589b4adb Hurd: avoid PLT call to strtoul 2012-05-10 15:57:28 -07:00
H.J. Lu eb96ffb07d Move stdio-common/_itoa.h to sysdeps/generic 2012-03-20 16:00:23 -07:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Roland McGrath 8ad684db49 * sysdeps/posix/libc_fatal.c (__libc_message): Add a const, a cast.
* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Fix cast.
	* hurd/report-wait.c (_S_msg_report_wait): Likewise.

	* include/sys/xattr.h: New file.
2005-12-29 10:38:16 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Roland McGrath c01ec9c73d * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Use strtoul,
not strtol.  The former is usable in ld.so, the latter not.
2003-01-13 03:45:38 +00:00
Roland McGrath 337738b771 * sysdeps/mach/hurd/xstat64.c: Conditionalize entire contents of the
file on [!RTLD_STAT64].
	* sysdeps/mach/hurd/fxstat64.c: Likewise.

	* sysdeps/mach/hurd/tmpfile.c (tmpfile64): Define as alias of tmpfile.
	(__fdopen): Use INTUSE.
	* sysdeps/mach/hurd/tmpfile64.c: New file, empty placeholder.

	* stdio-common/tmpfile64.c: File removed.
	* sysdeps/generic/tmpfile64.c: New file.
	* sysdeps/generic/tmpfile.c (GEN_THIS): New macro, define to __GT_FILE
	if not already defined.
	(tmpfile): Use it in place of __GT_FILE.

	* include/unistd.h: Declare __chown_internal.

	* sysdeps/mach/hurd/sendfile64.c (sendfile64): Do real work here.
	* sysdeps/mach/hurd/sendfile.c (sendfile): Call that.

2002-06-09  Roland McGrath  <roland@frob.com>

	Update to new Hurd RPC interfaces supporting 64-bit file sizes.
	* sysdeps/mach/hurd/configure.in: Check for <hurd/version.h> with
	value of HURD_INTERFACE_VERSION >= 20020609.
	* sysdeps/mach/hurd/configure: Regenerated.
	* shlib-versions (.*-.*-gnu-gnu.*): Set libhurduser=0.3.
	* sysdeps/mach/hurd/xstatconv.c (xstat64_conv): Rewritten to
	convert a struct stat64 into a struct stat and return 0 or -1
	with errno set to EOVERFLOW.
	* sysdeps/mach/hurd/statfsconv.c (statfs64_conv): Likewise
	for struct statfs64 to struct statfs.
	* sysdeps/mach/hurd/xstat.c (__xstat): Use converter and call ...
	* sysdeps/mach/hurd/xstat64.c (__xstat64): ... this, real work here.
	* sysdeps/mach/hurd/fxstat.c (__fxstat): Likewise.
	* sysdeps/mach/hurd/fxstat64.c (__fxstat64): Likewise.
	* sysdeps/mach/hurd/lxstat.c (__lxstat): Likewise.
	* sysdeps/mach/hurd/lxstat64.c (__lxstat64): Likewise.
	* sysdeps/mach/hurd/statfs.c (__statfs): Likewise.
	* sysdeps/mach/hurd/statfs64.c (__statfs64): Likewise.
	* sysdeps/mach/hurd/fstatfs.c (__fstatfs): Likewise.
	* sysdeps/mach/hurd/fstatfs64.c (__fstatfs64): Likewise.
	* sysdeps/mach/hurd/pwrite64.c (__libc_pwrite64): Do real work here.
	* sysdeps/mach/hurd/pwrite.c (__libc_pwrite): Call that.
	* sysdeps/mach/hurd/pread64.c (__libc_pread64): Do real work here.
	* sysdeps/mach/hurd/pread.c (__libc_pread): Call that.
	* sysdeps/mach/hurd/lseek64.c (__libc_lseek64): Do real work here.
	* sysdeps/mach/hurd/lseek.c (__libc_lseek): Call that.
	* sysdeps/mach/hurd/readdir64.c (__readdir64): Do real work here.
	* sysdeps/mach/hurd/readdir.c (__readdir): Call that.
	* sysdeps/mach/hurd/readdir64_r.c (__readdir64_r): Do real work here.
	* sysdeps/mach/hurd/readdir_r.c (__readdir64_r): Call that.
	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry):
	Use struct stat64 for io_stat argument.
	* sysdeps/mach/hurd/readlink.c (__readlink): Likewise.
	* hurd/fopenport.c (seekio): Remove EOVERFLOW check, pass POS directly
	to io_seek.
	* hurd/fd-read.c (_hurd_fd_read): Use loff_t for OFFSET argument.
	* hurd/fd-write.c (_hurd_fd_write): Likewise.
	* hurd/hurd/fd.h: Update decls.
	* sysdeps/mach/hurd/getcwd.c
	(_hurd_canonicalize_directory_name_internal): Use ino64_t
	and struct dirent64.
	* sysdeps/mach/hurd/dl-sysdep.c (open_file): Use struct stat64.
	(__xstat): Renamed to __xstat64, use struct stat64 for argument.
	(__fxstat): Renamed to __fxstat64, use struct stat64 for argument.
	(__lseek): Renamed to __libc_lseek64, use off64_t for argument.

2002-06-08  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/dirstream.h (struct __dirstream): Use size_t
	instead of unsigned long int for __allocation and __size members.

2002-05-19  Ulrich Drepper  <drepper@redhat.com>
2002-06-11 23:04:51 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
2001-07-06  Paul Eggert  <eggert@twinsun.com>

	* manual/argp.texi: Remove ignored LGPL copyright notice; it's
	not appropriate for documentation anyway.
	* manual/libc-texinfo.sh: "Library General Public License" ->
	"Lesser General Public License".

2001-07-06  Andreas Jaeger  <aj@suse.de>

	* All files under GPL/LGPL version 2: Place under LGPL version
	2.1.
2001-07-06 04:58:11 +00:00
Roland McGrath 5fe915ee12 * hurd/Makefile (routines): Add lookup-retry.
* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): Broken out ...
	* hurd/lookup-retry.c: ... into here, new file.
	* sysdeps/mach/hurd/dl-sysdep.c (open_file): Call that instead
	using of duplicate code here.

	* hurd/hurdexec.c (_hurd_exec): Be robust for DTABLESIZE==0.

	* posix/regex.c: Avoid an access violation if malloc fails.
2001-06-17 21:09:28 +00:00