Tweak README

This commit is contained in:
Thomas Hurst 2017-05-24 16:34:00 +01:00
parent 1bec2c3ea4
commit 51f17578b5

View file

@ -1,9 +1,14 @@
# Capsicum # Capsicum
A simple FFI wrapper around the Capsicum OS capability and sandbox framework. A simple FFI wrapper around the [Capsicum](https://wiki.freebsd.org/Capsicum)
OS capability and sandbox framework.
## Installation ## Installation
A Capsicum-enabled OS is, of course, required. FreeBSD 10+ (or derivative),
possibly [capsicum-linux](http://capsicum-linux.org/).
Add this line to your application's Gemfile: Add this line to your application's Gemfile:
```ruby ```ruby
@ -18,6 +23,7 @@ Or install it yourself as:
$ gem install capsicum $ gem install capsicum
## Usage ## Usage
Basic synopsis: Basic synopsis:
@ -53,6 +59,7 @@ status.exitstatus # => 42
The result is a Process::Status object. The result is a Process::Status object.
## But How Can I get Anything Done? ## But How Can I get Anything Done?
Open your files and sockets before entering the sandbox. If you have a Open your files and sockets before entering the sandbox. If you have a
@ -72,12 +79,16 @@ File.renameat(dir, "foo", dir, "bar")
File.unlinkat(dir, "moo") File.unlinkat(dir, "moo")
``` ```
This is Ruby issue #10181: https://bugs.ruby-lang.org/issues/10181 Unfortunately, it doesn't. See https://bugs.ruby-lang.org/issues/10181
You may consider spawning off workers, maintaining a privileged master process,
and using IPC to communicate with them.
## Todo ## Todo
Wrap Casper to provide DNS services, additional rights controls, etc. Wrap Casper to provide DNS services, additional rights controls, etc.
## Development ## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run After checking out the repo, run `bin/setup` to install dependencies. Then, run
@ -89,9 +100,10 @@ release a new version, update the version number in `version.rb`, and then run
`bundle exec rake release`, which will create a git tag for the version, push `bundle exec rake release`, which will create a git tag for the version, push
git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing ## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Freaky/capsicum. Bug reports and pull requests are welcome on GitHub at https://github.com/Freaky/ruby-capsicum.
## License ## License