Skip to content

Commit

Permalink
SELinux: return EOPNOTSUPP not ENOTSUPP
Browse files Browse the repository at this point in the history
ENOTSUPP is not a valid error code in the kernel (it is defined in some
NFS internal error codes and has been improperly used other places).  In
the !CONFIG_SECURITY_SELINUX case though it is possible that we could
return this from selinux_audit_rule_init().  This patch just returns the
userspace valid EOPNOTSUPP.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
eparis authored and James Morris committed Nov 16, 2007
1 parent 8c08634 commit ec41878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/selinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static inline int selinux_audit_rule_init(u32 field, u32 op,
char *rulestr,
struct selinux_audit_rule **rule)
{
return -ENOTSUPP;
return -EOPNOTSUPP;
}

static inline void selinux_audit_rule_free(struct selinux_audit_rule *rule)
Expand Down

0 comments on commit ec41878

Please sign in to comment.