]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Better fix for r314098
authorBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 22 Feb 2017 16:37:45 +0000 (16:37 +0000)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 22 Feb 2017 16:37:45 +0000 (16:37 +0000)
commit0064a5b36dbbcd94ad14338e1110072a209f9882
tree186413adc960265aba561ce99c112f0dcfe6804b
parente872af3a64486379871fc701484a1eb6922f1eb2
Better fix for r314098

The actual issue was the fact that if - was used then some restriction were
already set to stdin when we were applying caph_limit_stdio which was failing
due to the fact the fd was the fd was already restricted to lower rights.

Restricting stdio before actually opening the files prevent trying to raise the
right and fixes the issue.

And this allows to keep failing the program if restriction failed

Approved by: allanjude
Differential Revision: https://reviews.freebsd.org/D9723
usr.bin/lam/lam.c