Skip to content

systemd: add sandboxing options (old)#58

Closed
mmilata wants to merge 115 commits intoDanielAdolfsson:1.0-develfrom
mmilata:systemd-sandboxing
Closed

systemd: add sandboxing options (old)#58
mmilata wants to merge 115 commits intoDanielAdolfsson:1.0-develfrom
mmilata:systemd-sandboxing

Conversation

@mmilata
Copy link
Copy Markdown

@mmilata mmilata commented Nov 29, 2019

Adds some systemd sandboxing options to the service file. Ported from NixOS/nixpkgs#74700. Might be good idea to test it some more before merging:)

Daniel Adolfsson added 30 commits September 13, 2011 21:26
Fix a bug with ptr<> that at some occasions will try to free _ref
multiple times when release() becomes nested.
- Clean up some junk code that was left over.

- Replace ptr<> with strong_ptr<> and weak_ptr<> to easier distinguish
  between weak and strong pointers.

- Fix a couple of bugs.
Inside iface::~iface(), make sure to close any open sockets
and restore ALLMULTI to it's original value.
* Add '-d' to "daemonize". Will also enable syslogging.

* Fix a couple of bugs in 'session'.

* Clean up 'log', and use LOG_* macros instead.

* Add syslog(bool) to 'log' to enable/disable the use of syslog.
* Make iface::read() return a bit more generic address (sockaddr).

* Add is_unicast() and is_multicast() to address.

* Set default config path to "/etc/ndppd.conf".

* Silently ignore solicit messages with bad saddr and/or daddr.
* Change Makefile so release is the default mode, use DEBUG=1 to turn
  on debugging.

* Clean up 'conf' a bit.

* Add a new option 'router' (valid in 'proxy' section) to turn on/off
  the ND_NA_FLAG_ROUTER flag for adverts.
- 'ttl' to control how long a session will stay in the cache once the
  session becomes valid or invalid. Default is 30 seconds.

- 'timeout' to control how long a session will wait for a Neighbor
  Advertisement before being invalidated. Default is 500 ms.
- Update Makefile to provide 'install'.

- Add manpages ndppd(1) and ndppd.conf(5).
john-sharratt and others added 23 commits July 2, 2017 10:29
…ond to queries send from the gateway (for instance when it needs to route to a WAN address thats local)
…ssage rather than an error code is returned for easier debugging
…ation request causing none of the sessions to really expire
…ifically asked for one yet thus ensuring the routes are created and that the latecy on proxy solicitation is kept much lower
…e local machine which will be used to cover some missing solicitation requests
…kept up during high traffic when no proactive NDP soliciations are sent by the sender
Feature to automatically wire the routes for a gateway
nd-proxy is not built by `make all`, so it shouldn't be copied by `make
install`.

Signed-off-by: Blake Gentry <blakesgentry@gmail.com>
…om-makefile

remove cp nd-proxy from make install
…n, as otherwise we

loose the ALLMULTI flag on the listening interfaces during the whole process.
Probable cause is the parent restoring the original state of the interface
flags before exitting.
/etc/init.d/ndppd. Probably works on current stable as well, but
I couldn't test this so far.
When an interface disappears handle the resulting POLLERR
result from polling. Ignoring this will cause ndppd to go into
a hot loop.

This is a very simple fix that will make the daemon terminate.
@Mic92
Copy link
Copy Markdown

Mic92 commented Nov 30, 2019

If this goes through, it might be a good idea to also use the unit file directly in the NixOS module.

@DanielAdolfsson
Copy link
Copy Markdown
Owner

Cool! Although, I'm not accepting new PRs to the 0.x branch. Working on a complete rewrite under branch 1.0-devel. It's not ready yet, but I would accept a PR for this fix to that branch.

@mmilata mmilata closed this Dec 11, 2019
@mmilata mmilata changed the base branch from master to 1.0-devel December 11, 2019 15:53
@mmilata
Copy link
Copy Markdown
Author

mmilata commented Dec 11, 2019

I suck at using github and accidentally closed this when trying to change base branch to 1.0-devel. Please see #59 for another attempt.

@Mic92 do you mean for the NixOS module to install unit file from upstream sources instead of generating one? Do you know of other modules that do it? We'd have to inject the path to the binary somehow and also change the unit type forking -> simple.

@mmilata mmilata changed the title systemd: add sandboxing options systemd: add sandboxing options (old) Dec 11, 2019
@Mic92
Copy link
Copy Markdown

Mic92 commented Dec 11, 2019

@mmilata You can override unit description from nixos configuration. Have a look at the nfs module. It uses systemd.packages to add the systemd units and than just overrides selective options using the normal systemd service options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.