diff options
author | Dan Carpenter <error27@gmail.com> | 2010-06-12 20:50:35 +0200 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 15:35:01 +1000 |
commit | 9e0bd4cba4460bff64fb07cfb07849cdfd4d325a (patch) | |
tree | feebec6167012e461d286c02ae45348ad0b2d3a1 /ipc | |
parent | dce3a3d2ee038d230323fe06b061dbaace6b8f94 (diff) |
selinux: cleanup return codes in avtab_read_item()
The avtab_read_item() function tends to return -1 as a default error
code which is wrong (-1 means -EPERM). I modified it to return
appropriate error codes which is -EINVAL or the error code from
next_entry() or insertf().
next_entry() returns -EINVAL.
insertf() is a function pointer to either avtab_insert() or
cond_insertf().
avtab_insert() returns -EINVAL, -ENOMEM, and -EEXIST.
cond_insertf() currently returns -1, but I will fix it in a later patch.
There is code in avtab_read() which translates the -1 returns from
avtab_read_item() to -EINVAL. The translation is no longer needed, so I
removed it.
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions