]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
filedesc: cleanup setugidsafety a little
authorMateusz Guzik <mjg@FreeBSD.org>
Wed, 22 Oct 2014 00:23:43 +0000 (00:23 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Wed, 22 Oct 2014 00:23:43 +0000 (00:23 +0000)
commit11888da8d99561cc8bec8be3bff7cb0307de30e1
tree6a36b43cbe03e6686b72f3132ca176603d8ccb7d
parent07b384cbe277ca514c5ab5170af677494d8ba242
filedesc: cleanup setugidsafety a little

Rename it to fdsetugidsafety for consistency with other functions.

There is no need to take filedesc lock if not closing any files.

The loop has to verify each file and we are guaranteed fdtable has space
for at least 20 fds. As such there is no need to check fd_lastfile.

While here tidy up is_unsafe.
sys/kern/kern_descrip.c
sys/kern/kern_exec.c
sys/sys/filedesc.h