aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/hashtab.h
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-06-12 20:50:35 +0200
committerJames Morris <jmorris@namei.org>2010-08-02 15:35:01 +1000
commit9e0bd4cba4460bff64fb07cfb07849cdfd4d325a (patch)
treefeebec6167012e461d286c02ae45348ad0b2d3a1 /security/selinux/ss/hashtab.h
parentdce3a3d2ee038d230323fe06b061dbaace6b8f94 (diff)
downloadmrst-s0i3-test-9e0bd4cba4460bff64fb07cfb07849cdfd4d325a.tar.gz
mrst-s0i3-test-9e0bd4cba4460bff64fb07cfb07849cdfd4d325a.tar.xz
mrst-s0i3-test-9e0bd4cba4460bff64fb07cfb07849cdfd4d325a.zip
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 'security/selinux/ss/hashtab.h')
0 files changed, 0 insertions, 0 deletions