Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

though I think [selinux] doesn't support restricting all callers of a binary

It can, in two ways: the current context (say, user_dev_t) needs execute permissions on the declared type of the executable (say, git_exec_t), and additionally, you can declare a type transition to be performed per calling context.

To keep with the git example (I admit it's a bit contrived), you could label your .git directory as git_repo_t and deny access for both user_t (normal user context) and user_dev_t (user dev context). Then, you can define a type transition as above (user_dev_t -> git_exec_t => git_t), and allow only the context git_t access to git_repo_t files. With this setup in place:

- git, as called from within user_dev_t works as normally

- git, as called from user_t, has no defined type transition so will try to access git_repo_t under the user_t context, which will fail.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: