Rework client password input#3488
Conversation
Signed-off-by: Doug Nazar <nazard@nazar.ca>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit 86ca800 is temporarily available: NUT-tarballs-PR-3488.zip. |
13b427c to
974e00b
Compare
| if (fp == NULL) | ||
| return NULL; | ||
|
|
||
| p = fgets(buffer, buffer_size, fp); |
Signed-off-by: Doug Nazar <nazard@nazar.ca>
|
Gotta review actual changes, but at face value seems similar to a solution for issue #3329 that is in dev/CI loops for a few weeks now (and cooking dependent branches for further binding/client support. Rework of |
974e00b to
86ca800
Compare
|
✅ Build nut 2.8.5.4842-master completed (commit b1ae1a9df0 by @dougnazar)
|
|
✅ Build nut 2.8.5.4842-master completed (commit b1ae1a9df0 by @dougnazar) |
|
Oops. I did a quick search for Looks like I can do what I want with that patch, although it feels a little awkward to me. If I have a system file and a user file it'll only read the system file if I include it. Perhaps the system file should always be read, with any user/specified file overriding it. Then you could force system-wide various SSL defaults and then per-user have the login credentials. Anyways, feel free to close, I'm happy with either solution. |
|
Actually, per Whichever is found is the only one parsed (but it may Note that the system-wide file may be generally not readable by user accounts (the few admin accounts can be part of a POSIX group allowed to read it though). |
|
UPDATE: I realized that #3329 did not seem like related to "authconf", as the comment with config file design got hidden by github. Reworded that issue and added links to make it clearer in hindsight :) |
However if a user creates a authconf file, they may not know to include a system default file or where the CA file is or that they should force SSL. Also, with a system default file, you wouldn't need to always specify
The way I'd handle this is a world readable system default file that For instance, |
Couple simple changes to password handling for the clients, mainly because I don't want to specify the password on a command line for my weekly battery tests. Cleaned up the usage of deprecated
getpass()while I was at it.readpassphrase()if available