mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
flask: fix error propagation from flask_security_set_bool()
The function should return an error when flask_security_make_bools()
fails as well as when the input ID is out of range.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
master commit: 31f3620be0
master date: 2014-02-11 11:13:22 +0100
This commit is contained in:
1 parent
aa32bc5b41
commit
a6969931cf
1 file changed
+4
-3
@@ -364,9 +364,10 @@ static int flask_security_set_bool(struct xen_flask_boolean *arg)
|
||||
else
|
||||
{
|
||||
if ( !bool_pending_values )
|
||||
flask_security_make_bools();
|
||||
|
||||
if ( arg->bool_id >= bool_num )
|
||||
rv = flask_security_make_bools();
|
||||
if ( !rv && arg->bool_id >= bool_num )
|
||||
rv = -ENOENT;
|
||||
if ( rv )
|
||||
goto out;
|
||||
|
||||
bool_pending_values[arg->bool_id] = !!(arg->new_value);
|
||||
|
||||