summaryrefslogtreecommitdiff
path: root/share/examples/secmodel/secmodel_example.c
AgeCommit message (Collapse)Author
2018-08-25Add KAUTH_REQ_PROCESS_CANSEE_EPROC, and use it for the kern.proc node.maxv
Same permission as before, so no functional change.
2018-07-15Retire ipkdb entirely. The option was removed from the config filesmaxv
yesterday. ok kamil christos
2011-12-04Update secmodel_examples to better describe the secmodel(9) API.jym
2008-02-28Introduce a new kauth action, KAUTH_NETWORK_NFS, and two requests,elad
KAUTH_REQ_NETWORK_NFS_EXPORT and KAUTH_REQ_NETWORK_NFS_SVC, and use them to replace two KAUTH_GENERIC_ISSUSER calls in the NFS code. Also replace two more with KAUTH_SYSTEM_MKNOD, where appropriate. Documetnation and examples updated. More to come.
2008-02-28Factor out the guts of get/setparam so it can be used from the compat code.elad
Make the FreeBSD and Linux compat code convert the parameters to their native representation and call the native routines. Remove KAUTH_PROCESS_SCHEDULER_GET/SET. Update documentation and examples. XXX: For now, only the Linux compat code does the priority conversion XXX: right. Linux priority conversion code from yamt@, thanks! Okay yamt@.
2008-02-16Fold KAUTH_REQ_PROCESS_SCHEDULER_* to KAUTH_PROCESS_SCHEDULER_*. In otherelad
words, don't pass an action and a request, and just use a single action to indicate what is the operation in question. This is the first step in fixing PR/37986, which calls for policy/priority checking in the secmodel code. Right now we're lacking room for another parameter required to make a decision, and this change makes room for such.
2008-02-02Add, document, and use KAUTH_REQ_PROCESS_KTRACE_PERSISTENT.elad
2008-02-01Replace a KAUTH_GENERIC_ISSUSER in the cpuctl code with a proper kauthelad
request. Reviewed by ad@, tested by me.
2008-01-30Use proper kauth(9) actions/requests for native scheduler stuff and theelad
recently introduced processor-sets. Discussed with and okay rmind@, yamt@, and christos@.
2008-01-23Tons of process scope changes.elad
- Add a KAUTH_PROCESS_SCHEDULER action, to handle scheduler related requests, and add specific requests for set/get scheduler policy and set/get scheduler parameters. - Add a KAUTH_PROCESS_KEVENT_FILTER action, to handle kevent(2) related requests. - Add a KAUTH_DEVICE_TTY_STI action to handle requests to TIOCSTI. - Add requests for the KAUTH_PROCESS_CANSEE action, indicating what process information is being looked at (entry itself, args, env, open files). - Add requests for the KAUTH_PROCESS_RLIMIT action indicating set/get. - Add requests for the KAUTH_PROCESS_CORENAME action indicating set/get. - Make bsd44 secmodel code handle the newly added rqeuests appropriately. All of the above make it possible to issue finer-grained kauth(9) calls in many places, removing some KAUTH_GENERIC_ISSUSER requests. - Remove the "CAN" from KAUTH_PROCESS_CAN{KTRACE,PROCFS,PTRACE,SIGNAL}. Discussed with christos@ and yamt@.
2008-01-07Make fork use kauth.elad
Been running in my tree for over a month at least. Reviewed and okay yamt@, and special thanks to him as well as rittera@ for making this possible through fixing NDIS to not call fork1() with l1 != curlwp.
2007-12-31Remove systrace. Ok core@.ad
2007-11-23s, , ,uebayasi
2007-11-23Kill another instance of KAUTH_GENERIC_ISSUSER.elad
2007-01-20Kill KAUTH_PROCESS_RESOURCE and just replace it with two actions forelad
nice and rlimit.
2007-01-15arg0 is always 'struct proc *' for the process scope.elad
2007-01-05We no longer have 'enum kauth_machdep_req'.elad
2007-01-02Make mount(2) and unmount(2) use kauth(9) for security policy.elad
Okay yamt@.
2006-12-26Make machdep scope architecture-agnostic by removing all arch-specificelad
requests and centralizing them all. The result is that some of these are not used on some architectures, but the documentation was updated to reflect that.
2006-12-22Add requests indicating access to unmanaged memory for arm, pc532, powerpc,elad
sh3, sh5, and vax, and use them instead of KAUTH_GENERIC_ISSUSER. Update documentation and example secmodel code.
2006-12-14- moves 'nice' access semantics to secmodel code,elad
- makes sysctl_proc_find() just lookup the process, - use KAUTH_PROCESS_CANSEE requests to determine if the caller is allowed to view the target process' corename, stop flags, and rlimits, - use explicit kauth(9) calls with KAUTH_PROCESS_CORENAME, KAUTH_REQ_PROCESS_RESOURCE_NICE, KAUTH_REQ_PROCESS_RESOURCE_RLIMIT, and KAUTH_PROCESS_STOPFLAG when modifying the aforementioned. - sync man-page and example skeleton secmodel with reality. okay yamt@ this is a pullup candidate.
2006-11-22Introduce KAUTH_REQ_MACHDEP_{ALPHA,X86}_UNMANAGEDMEM to handle accesselad
to unmanaged memory. These are the last two securelevel references in the MD code.
2006-11-04Add example listener for the device scope.elad
While here, sync with reality.
2006-10-25Introduce KAUTH_REQ_NETWORK_SOCKET_OPEN, to check if opening a socket iselad
allowed. It takes three int * arguments indicating domain, type, and protocol. Replace previous KAUTH_REQ_NETWORK_SOCKET_RAWSOCK with it (but keep it still). Places that used to explicitly check for privileged context now don't need it anymore, so I replaced these with XXX comment indiacting it for future reference. Documented and updated examples as well.
2006-10-20Introduce a new action on the network scope, KAUTH_NETWORK_INTERFACE,elad
used to manage network interfaces. Add four sub-actions to fulfill generic needs for now, until a more carefully defined usage of the interface is documented: get, set, getpriv, and setpriv.
2006-10-20Add a new ALTQ kauth(9) request, KAUTH_REQ_NETWORK_ALTQ_JOBS.elad
2006-10-13Introduce KAUTH_REQ_NETWORK_SOCKET_CANSEE. Since we're not gonna be havingelad
credentials on sockets, at least not anytime soon, this is a way to check if we can "look" at a socket. Later on when (and if) we do have socket credentials, the interface usage remains the same because we pass the socket. This also fixes sysctl for inet/inet6 pcblist.
2006-09-15Add skeleton files to be used by developers interested in writing NetBSDelad
security models from scratch. Address issues both for in-tree integration as well as distribution as LKMs. Placed in the public domain.