mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
example: Use const in auth_password from samplesshd.
This commit is contained in:
@@ -59,7 +59,7 @@ static void cleanup_pcap(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int auth_password(char *user, char *password){
|
static int auth_password(const char *user, const char *password){
|
||||||
if(strcmp(user, SSHD_USER))
|
if(strcmp(user, SSHD_USER))
|
||||||
return 0;
|
return 0;
|
||||||
if(strcmp(password, SSHD_PASSWORD))
|
if(strcmp(password, SSHD_PASSWORD))
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ static void cleanup_pcap(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int auth_password(char *user, char *password){
|
static int auth_password(const char *user, const char *password){
|
||||||
if(strcmp(user, SSHD_USER))
|
if(strcmp(user, SSHD_USER))
|
||||||
return 0;
|
return 0;
|
||||||
if(strcmp(password, SSHD_PASSWORD))
|
if(strcmp(password, SSHD_PASSWORD))
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void cleanup_pcap(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int auth_password(char *user, char *password){
|
static int auth_password(const char *user, const char *password){
|
||||||
if(strcmp(user,"aris"))
|
if(strcmp(user,"aris"))
|
||||||
return 0;
|
return 0;
|
||||||
if(strcmp(password,"lala"))
|
if(strcmp(password,"lala"))
|
||||||
|
|||||||
Reference in New Issue
Block a user