https://bugs.freedesktop.org/show_bug.cgi?id=43095

--- Comment #5 from Lionel Elie Mamane <[email protected]> 2011-12-04 12:45:17 
PST ---
(In reply to comment #3)
> And that is portable to all Unix systems we care for?

Which systems is that? Standards-wise, faccessat() is in POSIX.1-2008 and Open
Group Extended API Set, Part 2. It is supported by GNU/Linux and FreeBSD:

GNU/Linux: by default since glibc 2.10 (released in May 2009), needs "#define
_ATFILE_SOURCE 1" in older glibc. Needs kernel 2.6.16 (released 20 March 2006)
or later.

FreeBSD: version 8.0 and later. Release: 25 November 25 2009.

However, FreeBSD and "Open Group Extended API Set, Part 2" do not document the
AT_SYMLINK_NOFOLLOW flag for faccessat :-( So, hmm.


> And symlinks are the only thing that can make access() misleading?

If LibreOffice is setuid-foo, then access() checks permission for the invoking
user, not for foo. That is fixed in FreeBSD and GNU/Linux with the eaccess()
function, but that is not standard. That's also what the AT_EACCESS flag to
faccessat does.


However, now that I think about it, checking permissions of the symlink rather
than permissions of symlink's target is probably the wrong thing anyway.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to