Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EPERM for CTLFLAG_ANYBODY sysctl.



Hi, all.

Could you give me a hint, why do I get an EPERM error from
sysctlbyname() for a write attempt to a sysctl of a type:

SYSCTL_PROC (
    _kern,
    OID_AUTO,
    my_name,
    CTLTYPE_OPAQUE | CTLFLAG_WR | CTLFLAG_ANYBODY | CTLFLAG_KERN,
    0,
    0,
    sysctl_handler,                                 // my handler
    "S",
    ""
);

The sysctl is registered from within a kext.

I get EPERM error for non-root processes, while it works fine for root
processes.
Shouldn't CTLFLAG_ANYBODY flag make it possible for non-root processes
to write to the sysctl?

Thanks in advance,
 - Maxim.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.