:: [devuan-dev] bug#498: Bug#966343: b…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Aurelien Jarno
Ημερομηνία:  
Προς: Alessandro Vesely, 966343-done
Υ/ο: 498
Αντικείμενο: [devuan-dev] bug#498: Bug#966343: bug#498: libc6: Permission denied, intermittent in execve
Hi,

On 2020-07-27 19:01, Alessandro Vesely wrote:
> On Mon, 27 Jul 2020 12:13:44 +0200 Samuel Thibault <sthibault@???> wrote:
> > Alessandro Vesely, le lun. 27 juil. 2020 11:47:34 +0200, a ecrit:
> > > So this turns out to be a documentation bug. The execve man page should mention that EACCESS can result as an (unforeseen) apparmor impediment.
> >
> > Well, basically all system calls would then need this...
>
>
> Yeah, likely. How many man pages have snippets like "[...] denied for one of the directories in the path [...]"?
>
> Yet, considering the following examples, they seem to have been written manually rather than resorting to some sort of script:


There are many syscalls that might end up returning EACCESS. Mapping
them to the corresponding libc functions might not be always fully
linear.

[snip]

> Philip Couling commented that the man page /could/ mention security extensions since they are prevelent. See:
> https://unix.stackexchange.com/questions/600174/identical-execve-causes-permission-denied-for-one-program-but-not-another/600529#comment1121270_600529
>
> For execve, for example, one could add that permissions are not derived from file flags only. For example:
>
> OLD:
>
>        EACCES Execute permission is denied for the file or a script or ELF interpreter.

>
> NEW:
>
>        EACCES Execute permission for the file or a script or ELF interpreter is denied either by flags or by security modules.

>
>
> Would that be correct? Do all "DENIED" operations result in EACCES? And what do other security modules do? Hmm... Starting to document that mess from the point of view of programs getting such failure codes would allow better logging and better troubleshooting.


That seems correct for apparmor (although it can also return ENOENT in
case of race condition), not sure about other security modules. seccomp
just kills the process, not sure you want to mention that in every
possible manpages.

In any case this is now out of scope for the glibc package, so I am
closing the bug. If you feel that the doc needs to be updated, please
open a bug against the corresponding package.

Regards,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@???                 http://www.aurel32.net