Debian Bug report logs - #411177
manpages-dev: faccessat(2) wrong title and wrong information (was://Re: fchownat.3 unbalanced paranthesis, bogus return)

version graph

Package: manpages-dev; Maintainer for manpages-dev is Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

Reported by: Justin Pryzby <justinpryzby@users.sourceforge.net>

Date: Fri, 16 Feb 2007 20:36:14 UTC

Severity: normal

Tags: patch

Found in version manpages/2.40-1

Fixed in version manpages/2.44-1

Done: Florian Ernst <florian_ernst@gmx.net>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#411177; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: submit@bugs.debian.org
Subject: manpages-dev: faccessat(2) wrong title and wrong information (was://Re: fchownat.3 unbalanced paranthesis, bogus return)
Date: Fri, 16 Feb 2007 15:35:43 -0500
[Message part 1 (text/plain, inline)]
Package: manpages-dev
Version: 2.40-1
Tags: patch

On Wed, Jul 05, 2006 at 02:17:15PM +0200, Michael Kerrisk wrote:
> > > Unbalanced paren fixed for 2.35.  Not sure what your problem is with
> > > "return" though; please explain.
> > It changes the [ug]id, doesn't return anything except -1 or 0.
> 
> Doh!  Yes -- thanks.  Fixed in 2.35 as below.
Another one:
faccessat  -  change permissions of a file relative to a directory file descriptor


|AT_EACCESS
|Perform  access  checks  using the effective user and group IDs.
|By default, faccessat() uses the effective IDs (like access(2)).

|access(2):
|The check is done with the process’s real UID and GID, rather than with
|the  effective  IDs  as  is done when actually attempting an operation.
|This is to allow set-user-ID programs to easily determine the  invoking
|user’s authority.

It is my understanding that access(2) is correct, and accessat is wrong (about
access, and about itself).

These also all require _ATFILE_SOURCE, and faccessat requires fcntl for
the enum/define foo.

Also give the return value meaning.

BTW. What is the proposed "eaccess" page?

Tested with glibc 2.5.

$ make CFLAGS='-Wextra -Wall -O0 -g' uid
cc -Wextra -Wall -O0 -g    uid.c   -o uid
$ sudo ls -la /tmp/root
total 8
drwx------  2 root root 4096 Feb 16 14:47 .
drwxrwxrwt 13 root root 4096 Feb 16 15:05 ..
-rw-r--r--  1 root root    0 Feb 16 14:47 foo
$ ./uid 
getuid: 1000
geteuid: 1000
getfsuid: 1000
access: -1
faccessat: -1 -1
$ sudo ./uid 
getuid: 0
geteuid: 0
getfsuid: 0
access: 0
faccessat: 0 0
$ sudo sh -c 'chown root ./uid; chmod u+s ./uid'
$ ./uid 
getuid: 1000
geteuid: 0
getfsuid: 0
access: -1
faccessat: -1 0

--- -	2007-02-16 15:34:04.085283363 -0500
+++ /tmp/faccessat.2	2007-02-16 15:34:01.000000000 -0500
@@ -1,6 +1,7 @@
 .\" Hey Emacs! This file is -*- nroff -*- source.
 .\"
 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
+.\" Fixes copyright (C) 2007 Justin Pryzby
 .\"
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
@@ -23,12 +24,14 @@
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
 .\"
-.TH FACCESSAT 2 2006-05-05 "Linux 2.6.16" "Linux Programmer's Manual"
+.TH FACCESSAT 2 2007-02-16 "Linux 2.6.16" "Linux Programmer's Manual"
 .SH NAME
-faccessat \- change permissions of a file relative to a directory \
+faccessat \- check user's permissions for a file relative to a directory \
 file descriptor
 .SH SYNOPSIS
 .nf
+.B #define _ATFILE_SOURCE
+.B #include <fcntl.h>
 .B #include <unistd.h>
 .sp
 .BI "int faccessat(int " dirfd ", const char *" pathname ", int " \
@@ -76,7 +79,7 @@
 Perform access checks using the effective user and group IDs.  
 By default, 
 .BR faccessat ()
-uses the effective IDs (like
+uses the real IDs (like
 .BR access (2)).
 .TP
 .B AT_SYMLINK_NOFOLLOW
@@ -85,7 +88,7 @@
 is a symbolic link, do not dereference it: 
 instead return information about the link itself.
 .SH "RETURN VALUE"
-On success,
+On success (all requested permissions granted),
 .BR faccessat () 
 returns 0.  
 On error, \-1 is returned and
[uid.c (text/x-csrc, attachment)]

Reply sent to Florian Ernst <florian_ernst@gmx.net>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 411177-done@bugs.debian.org (full text, mbox):

From: Florian Ernst <florian_ernst@gmx.net>
To: 411177-done@bugs.debian.org
Subject: Re: Bug#411177: manpages-dev: faccessat(2) wrong title and wrong information
Date: Thu, 14 Jun 2007 18:58:56 +0200
[Message part 1 (text/plain, inline)]
Package: manpages-dev
Version: 2.44-1

Hello Justin, hello Joey,

On Fri, Feb 16, 2007 at 03:35:43PM -0500, Justin Pryzby wrote:
> Package: manpages-dev
> Version: 2.40-1
> Tags: patch
> [...]
> Another one:
> faccessat  -  change permissions of a file relative to a directory file descriptor
> 
> 
> |AT_EACCESS
> |Perform  access  checks  using the effective user and group IDs.
> |By default, faccessat() uses the effective IDs (like access(2)).
> [...]

Fixed as per upstream 2.44 using your patch, please see
<http://cvs.infodrom.org/manpages/man2/faccessat.2.diff?r1=1.1.1.3;r2=1.1.1.4;cvsroot=debian>.

Cheers,
Flo
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 13 Jul 2007 07:59:29 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 11:33:55 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.