]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cap_filergs: limit size of the file name
authoroshogbo <oshogbo@FreeBSD.org>
Wed, 7 Aug 2019 19:30:33 +0000 (19:30 +0000)
committeroshogbo <oshogbo@FreeBSD.org>
Wed, 7 Aug 2019 19:30:33 +0000 (19:30 +0000)
commit232c4ff18a9a2fe22bdd7cec54bef0970413b548
treef71dac3a69046beeecd49a894666eacbf396fee2
parent10d53fcce8d03533ba3ded8380337cc79b974fad
cap_filergs: limit size of the file name

The limit of the name in fileargs is twice the size of the MAXPATH.
The nvlist will not add an element with the longer name.
We can detect at this point that the path is too big, and simple return
the same error as open(2) would.

PR: 239700
Reported by: markj
Tested by: markj
MFC after: 2 weeks
lib/libcasper/services/cap_fileargs/cap_fileargs.c