3 ms·
> What are the command-line options that are available to that tool? Without looking in the source code. While not the greatest example of documentation, it's
by kbenson 11y ago
> What are the command-line options that are available to that tool? Without looking in the source code.
While not the greatest example of documentation, it's not completely horrible. It accepts a single parameter which is the seed (yes, I looked at the source). I imagine it was an oversight for a very simple program with a singular purpose and which isn't meant to be called manually. It's not great, but it doesn't carry the same weight with me as if there were multiple possible or required arguments, or even a single optional one. Perhaps there are examples like that, I don't know.
It's hard for me to get worked up about the level of documentation of systemd compared to SysVinit, when things like OpenBSD exist that achieve such a high level of quality that they are both utterly shamed, and appear relatively similar in their mediocrity.
- reddytowns 11y agoAccepting something as cryptographicly significant as a rng seed as a command line argument makes my security whiskers bristle. Especially since the ultimate destination for that value is a root owned 600 perm file.
- ktRolster 11y agoIt doesn't do that, the gp post misread the source code. It reads the data from a file defined at compile time.
- majewsky 11y agoAs can be checked easily with `systemctl cat`: $ systemctl cat systemd-random-seed # /usr/lib/systemd/system/systemd-random-seed.service [...] ExecStart=/usr/lib/systemd/systemd-random-seed load ExecStop=/usr/lib/systemd/systemd-random-seed save [...] Note how the executable is not even installed to /usr/bin, because it's explicitly not supposed to be called by a user.
- kbenson 11y agoYes, I skimmed the file far too quickly. I was working off some assumptions from the portion I saw that errored if argc != 2, with an error along the lines of "There must be only one argument".
- ktRolster 11y agoThat's fine. Now try to do a retrospective to figure out how the mistake was made, so it doesn't happen again
- kbenson 11y ago> Now try to do a retrospective to figure out how the mistake was made, so it doesn't happen again What? It doesn't affect my point in any way. I looked at multiple other man pages for services before posting, and noted that of the ones I checked, they all listed options for the service and/or command. I stand by other other portion of my comment (whether you interpreted them as I meant, or in some more negative light that might induce the negativity I feel from this reply). I noted my reasoning on why I didn't find your example entirely compelling, but also noted that there could well be other examples that fit the criteria of what I considered more problematic. I still believe the man pages are lacking quite a bit with respect to OpenBSD equivalents.