Untitled
unknown
plain_text
a year ago
856 B
5
Indexable
if (verificare(root, username)) {
const char PASSWORD_PROMPT[] = "Introduceti parola:\n";
trimitem(tdC.cl, PASSWORD_PROMPT, strlen(PASSWORD_PROMPT));
citim(tdC.cl, password, sizeof(password));
// Verificăm dacă parola este corectă
if (verificare_parola(root, username, password)) {
const char SUCCESS_MSG[] = "Autentificare reusita.\n";
trimitem(tdC.cl, SUCCESS_MSG, strlen(SUCCESS_MSG));
authenticated = 1;
} else {
const char FAIL_MSG[] = "Parola incorecta.\n";
trimitem(tdC.cl, FAIL_MSG, strlen(FAIL_MSG));
}
} else {
const char USER_NOT_FOUND[] = "Numele de utilizator nu exista.\n";
trimitem(tdC.cl, USER_NOT_FOUND, strlen(USER_NOT_FOUND));
}Editor is loading...
Leave a Comment