Skip to contentSkip to conversation

Illegal errno from kernel

DISCUSSION Steve G 2 participants 3 messages Aug 14, 2007 SELinux security module

lore
Share & tools
lore

Steve G

author
#0 lore raw

Hi,

In security/selinux/ss/services.c at the selinux_audit_rule_init() function is this code:

        if (!ss_initialized)
                return -ENOTSUPP;

The audit system sends that to user space, but its a special value that is supposed to be internal to the kernel. Should the audit system look for this value and change it when it calls the function, or should we change this value in the selinux code? And if we change it, what should it be? EINVAL doesn't make sense as the syntax of what's being asked to do is correct. Should we define something like ENOMAC?

-Steve

      ____________________________________________________________________________________

Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 8 lines · Steve G

Hi,

In security/selinux/ss/services.c at the selinux_audit_rule_init() function is this code:

        if (!ss_initialized)
                return -ENOTSUPP;
Quoted 6 lines

The audit system sends that to user space, but its a special value that is supposed to be internal to the kernel. Should the audit system look for this value and change it when it calls the function, or should we change this value in the selinux code? And if we change it, what should it be? EINVAL doesn't make sense as the syntax of what's being asked to do is correct. Should we define something like ENOMAC?

It should likely have been -EOPNOTSUPP in the first place. So I'd just change it to that.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 16 lines · Stephen Smalley
Quoted 8 lines · Steve G

Hi,

In security/selinux/ss/services.c at the selinux_audit_rule_init() function is this code:

        if (!ss_initialized)
                return -ENOTSUPP;
Quoted 6 lines

The audit system sends that to user space, but its a special value that is supposed to be internal to the kernel. Should the audit system look for this value and change it when it calls the function, or should we change this value in the selinux code? And if we change it, what should it be? EINVAL doesn't make sense as the syntax of what's being asked to do is correct. Should we define something like ENOMAC?

Quoted 2 lines

It should likely have been -EOPNOTSUPP in the first place. So I'd just change it to that.

...and we already use that elsewhere in the SELinux code.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.