jirka-h / haveged

Entropy daemon ![Continuous Integration](https://github.com/jirka-h/haveged/workflows/Continuous%20Integration/badge.svg)
GNU General Public License v3.0
271 stars 34 forks source link

havegecmd: Fix error handling. #50

Closed hramrach closed 3 years ago

hramrach commented 3 years ago

Signed-off-by: Michal Suchanek msuchanek@suse.de

hramrach commented 3 years ago

@bitstreamout review, please

bitstreamout commented 3 years ago

I do not understand the change of enqry ... AFAICR the was no change of the API used by e.g. plymouthd or blogd to communicate with systemd...

-      enqry = "\x15";
+      enqry = -EPERM;
hramrach commented 3 years ago

I do not understand how this relates to plymouthd or blogd. It was just a magic constant which was replaced with a slightly less magic one.

hramrach commented 3 years ago

After examining plymouth and systemd I still see no relationship whatsoever.

bitstreamout commented 3 years ago

What me bothers is using integers at sending and receiving via socket whereas I'm using throughout byte. Meanwhile I've done a small modification of your commitment extended by a further command allowing to close the socket as well as a better error handling in new_root() to check if the new root includes the binary as well before executing it

bitstreamout commented 3 years ago

Compare with https://github.com/bitstreamout/haveged/commit/7615ca621d1ffaf1c3ad134e3744e2ab1cd1add1 (corrected)

jirka-h commented 3 years ago

Thanks for the PR, merging.

jirka-h commented 3 years ago

It conflicts with https://github.com/jirka-h/haveged/pull/52

I don't have any strong preference. Could you please discuss together and let me know the decision?

I see these options

Thanks Jirka