On 07/02/14 09:47, Jan Beulich wrote:
The function should return an error when flask_security_make_bools() as
when flask_security_make_bools() fails ?
well as when the input ID is out of range.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -364,9 +364,10 @@ static int flask_security_set_bool(struc
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 )
Surely you want "rv || arg->" if you want to catch both
flask_security_make_bools() failing as well as the input ID being
out of range?
~Andrew
+ rv = -ENOENT;
+ if ( rv )
goto out;
bool_pending_values[arg->bool_id] = !!(arg->new_value);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel