jail: don't assume positive return value of creat
authorDaniel Golle <daniel@makrotopia.org>
Fri, 13 Jan 2023 18:53:07 +0000 (18:53 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 16 Jan 2023 21:07:48 +0000 (21:07 +0000)
commit6b9629b7448cd11fc204c63608910700a4b47040
treee8ba17b6c8790042a4d9fbdf7e99e31c5e24ef4d
parent04d7570f473ca2a657a89f74ac4027f6c94f4305
jail: don't assume positive return value of creat

Handle a (theoretical) error case when calling creat in
create_dev_console function.

Coverity CID: 1490100 (Argument cannot be negative)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c