selinux: fix error codes in cond_read_node()
commitfc5c126e4733e6fb3080d3d822ca63226e74fc84
authorDan Carpenter <error27@gmail.com>
Sat, 12 Jun 2010 18:53:46 +0000 (12 20:53 +0200)
committerJames Morris <jmorris@namei.org>
Mon, 2 Aug 2010 05:35:02 +0000 (2 15:35 +1000)
tree3320c22b66107c984ac0cf07c365420df42a4977
parent9d623b17a740d5a85c12108cdc71c64fb15484fc
selinux: fix error codes in cond_read_node()

Originally cond_read_node() returned -1 (-EPERM) on errors which was
incorrect.  Now it either propagates the error codes from lower level
functions next_entry() or cond_read_av_list() or it returns -ENOMEM or
-EINVAL.

next_entry() returns -EINVAL.
cond_read_av_list() returns -EINVAL or -ENOMEM.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Stephen D. Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/ss/conditional.c