使用到这个函数的代码部分:sshd.c里
if (auth_password(user, "")) {
~~~~~~~~~~~~~~~~~~~~~~~
/* Authentication with empty password succeeded. */
authentication_type = SSH_AUTH_PASSWORD;
authenticated = 1;
/* Success packet will be sent after loop below. */
} else {
/* Indicate that authentication is needed. */
packet_start(SSH_SMSG_FAILURE);
packet_send();
packet_write_wait();
}
和
/* Try authentication with the password. */
if (auth_password(user, password)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* Successful authentication. */
/* Clear the password from memory. */
memset(password, 0, strlen(password));
xfree(password);
log_msg("Password authentication for %.100s accepted.", user);
authentication_type = SSH_AUTH_PASSWORD;
authenticated = 1;
break;
}
debug("Password authentication for %.100s failed.", user);
memset(password, 0, strlen(password));
xfree(password);
break;
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 这段函数的意思是
: 如果密码为空,
: 则判断:如果已经输入的用户名是guest(不分大小写)
: ...................
--
FROM 60.4.28.*