Mercurial > dropbear
comparison svr-auth.c @ 1538:f20038b513a5
more linting (#58)
* const parameter
* fix indentation
author | François Perrad <francois.perrad@gadz.org> |
---|---|
date | Mon, 26 Feb 2018 14:31:15 +0100 |
parents | 6a83b1944432 |
children | 51df3d53b050 |
comparison
equal
deleted
inserted
replaced
1537:6a83b1944432 | 1538:f20038b513a5 |
---|---|
36 #include "auth.h" | 36 #include "auth.h" |
37 #include "runopts.h" | 37 #include "runopts.h" |
38 #include "dbrandom.h" | 38 #include "dbrandom.h" |
39 | 39 |
40 static void authclear(void); | 40 static void authclear(void); |
41 static int checkusername(char *username, unsigned int userlen); | 41 static int checkusername(const char *username, unsigned int userlen); |
42 | 42 |
43 /* initialise the first time for a session, resetting all parameters */ | 43 /* initialise the first time for a session, resetting all parameters */ |
44 void svr_authinitialise() { | 44 void svr_authinitialise() { |
45 | 45 |
46 ses.authstate.failcount = 0; | 46 ses.authstate.failcount = 0; |
261 } | 261 } |
262 | 262 |
263 | 263 |
264 /* Check that the username exists and isn't disallowed (root), and has a valid shell. | 264 /* Check that the username exists and isn't disallowed (root), and has a valid shell. |
265 * returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */ | 265 * returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */ |
266 static int checkusername(char *username, unsigned int userlen) { | 266 static int checkusername(const char *username, unsigned int userlen) { |
267 | 267 |
268 char* listshell = NULL; | 268 char* listshell = NULL; |
269 char* usershell = NULL; | 269 char* usershell = NULL; |
270 uid_t uid; | 270 uid_t uid; |
271 | 271 |