mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-11 03:56:25 +00:00
a712ec33d9
getcredentials answered xcat_secure_pw only for root, so a postscript had no way to get the password of another node account from the passwd table. xcat_secure_pw:<user> now returns the password field of the passwd row key=system,username=<user> when <user> is root or a sudoer named in the postscripts or postbootscripts of the requesting node, its osimage, or xcatdefaults. A sudoer without a row or without a password gets the locked field "!", so the node applies the reply as is. Any other user, an invalid user name, or a failed hash answers with an error instead of an empty reply. The root request reads the same row as before and keeps the error reply for a missing row.