mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 15:43:02 +02:00
confd: harmonize empty and missing password hash behavior
Removing a user's password hash should be the same an empty password hash. In the latter case we already allow login with SSH keys, this change harmonizes the behavior by also allowing login with SSH keys when the users's password hash is removed. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1087,10 +1087,10 @@ static sr_error_t handle_sr_passwd_update(sr_session_ctx_t *, struct confd *conf
|
||||
NOTE("Password updated for user %s", user);
|
||||
break;
|
||||
case SR_OP_DELETED:
|
||||
if (set_password(user, "*", true))
|
||||
if (set_password(user, "*", false))
|
||||
err = SR_ERR_SYS;
|
||||
else
|
||||
NOTE("Password deleted for user %s", user);
|
||||
NOTE("Password login disabled for user %s", user);
|
||||
break;
|
||||
case SR_OP_MOVED:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user