sternenseemann / spacecookie

gopher library & server written in Haskell
https://sternenseemann.github.io/spacecookie/
GNU General Public License v3.0
47 stars 5 forks source link

feat(Network.Gopher): remove cRunUserName from GopherConfig #45

Closed sternenseemann closed 3 years ago

sternenseemann commented 3 years ago

It is not necessary to implement privilege dropping as part of the main Network.Gopher API anymore since it can easily be done in the ready action passed to runGopherManual.

To ease transition we expose an exception-throwing version of the formerly internal function dropPrivileges via Network.Gopher.Util which can be plugged into the ready action of runGopherManual if desired.

feat(server): exit if dropPrivileges fails

We don't catch the exception of dropPrivileges anymore, exiting on a failure related to it instead (user doesn't exist, insufficient privileges).

BREAKING CHANGES: