oping: Temporarily drop privileges if supported by the system.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 1 Oct 2009 08:28:10 +0000 (10:28 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 1 Oct 2009 08:28:10 +0000 (10:28 +0200)
commit5a2d8718ca250276308a7e9a9395870de119b753
tree6768a7bd35302fee752cfe9d8599703a1fa6b58b
parent0d959676fa18c7435a68f95544f7cff94cd05722
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.
src/oping.c