author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 1 Oct 2009 08:28:10 +0000 (10:28 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 1 Oct 2009 08:28:10 +0000 (10:28 +0200) | ||
commit | 5a2d8718ca250276308a7e9a9395870de119b753 | |
tree | 6768a7bd35302fee752cfe9d8599703a1fa6b58b | tree | snapshot |
parent | 0d959676fa18c7435a68f95544f7cff94cd05722 | commit | diff |
oping: Temporarily drop privileges if supported by the system.
This tries to solve the read-from-any-file-issue more elegantly by
dropping privileges first thing after start-up and regaining privileges
just to open the sockets.
This has the advantage that the "-f" option is available for all users
again and files are opened according to *their* permissions.
Systems not supporting the _POSIX_SAVED_IDS feature still behave as
before, i. e. if real and effective user IDs don't match, only "-" may
be specified as input file.
This tries to solve the read-from-any-file-issue more elegantly by
dropping privileges first thing after start-up and regaining privileges
just to open the sockets.
This has the advantage that the "-f" option is available for all users
again and files are opened according to *their* permissions.
Systems not supporting the _POSIX_SAVED_IDS feature still behave as
before, i. e. if real and effective user IDs don't match, only "-" may
be specified as input file.
src/oping.c | diff | blob | history |