diff --git a/login.c b/login.c index 6657631..7845841 100644 --- a/login.c +++ b/login.c @@ -14,7 +14,7 @@ static int do_change_object_passwd(char *name, { uint8 key[8]; - if (0 && !ncp_17_17(key)) { + if (!ncp_17_17(key)) { uint32 objid = ncp_17_35(name, objtyp); if (objid) { uint8 buff[128]; @@ -27,13 +27,14 @@ static int do_change_object_passwd(char *name, nw_encrypt(key, buff, encrypted); shuffle(tmpid, newpassword, strlen(newpassword), buff); + memcpy(newcryptpasswd, buff, sizeof(newcryptpasswd)); if (!ncp_17_4b(encrypted, name, objtyp, passwdx, newcryptpasswd)) { ;; return(0); } } - } else { /* now we use old unencrypted algorithmus */ + } else { /* fallback to old unencrypted algorithmus */ if (!ncp_17_40(name, objtyp, oldpassword, newpassword)) { ;; return(0);