Revision e19f9d65186d87258f05eae8a1b4e168594369fe authored by Mateusz Guzik on 18 July 2012, 04:52:37 UTC, committed by Mateusz Guzik on 18 July 2012, 04:52:37 UTC
Unbreak handling of descriptors opened with O_EXEC by fexecve(2).

While here return EBADF for descriptors opened for writing (previously it was ETXTBSY).

Add fgetvp_exec function which performs appropriate checks.

==

Follow-up commit to r238220:

Pass only FEXEC (instead of FREAD|FEXEC) in fgetvp_exec. _fget has to check for
!FWRITE anyway and may as well know about FREAD.

Make _fget code a bit more readable by converting permission checking from if()
to switch(). Assert that correct permission flags are passed.

PR:		kern/169651
In collaboration with:	kib
Approved by:	re (hrs), trasz (mentor)
1 parent 59b3442
History

back to top