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:
Jan Beulich committed 2014-02-13 10:11:54 +01:00
1 parent aa32bc5b41
commit a6969931cf
1 file changed
+4 -3
+4 -3
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.