summaryrefslogtreecommitdiffhomepage
path: root/svr-auth.c
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@gmail.com>2015-05-02 15:26:05 +0200
committerGaël PORTAY <gael.portay@gmail.com>2015-05-05 20:39:13 +0200
commitd680a9e3fbbfe58b2b4803b45f41a9b2a8fde620 (patch)
tree9f6b636309497ef79c6ec0ef78b9b00d75004bb7 /svr-auth.c
parent61726df20cea04ff09bbfdf4ca77519cf4b9088d (diff)
Turn username, servicename and methodname local variables into char *
Changing checkusername()'s username argument into char * as well.
Diffstat (limited to 'svr-auth.c')
-rw-r--r--svr-auth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/svr-auth.c b/svr-auth.c
index fc99063..44f8f13 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -36,7 +36,7 @@
#include "dbrandom.h"
static void authclear();
-static int checkusername(unsigned char *username, unsigned int userlen);
+static int checkusername(char *username, unsigned int userlen);
/* initialise the first time for a session, resetting all parameters */
void svr_authinitialise() {
@@ -100,7 +100,7 @@ void send_msg_userauth_banner(buffer *banner) {
* checking, and handle success or failure */
void recv_msg_userauth_request() {
- unsigned char *username = NULL, *servicename = NULL, *methodname = NULL;
+ char *username = NULL, *servicename = NULL, *methodname = NULL;
unsigned int userlen, servicelen, methodlen;
int valid_user = 0;
@@ -119,9 +119,9 @@ void recv_msg_userauth_request() {
svr_opts.banner = NULL;
}
- username = buf_getstring(ses.payload, &userlen);
- servicename = buf_getstring(ses.payload, &servicelen);
- methodname = buf_getstring(ses.payload, &methodlen);
+ username = (char *)buf_getstring(ses.payload, &userlen);
+ servicename = (char *)buf_getstring(ses.payload, &servicelen);
+ methodname = (char *)buf_getstring(ses.payload, &methodlen);
/* only handle 'ssh-connection' currently */
if (servicelen != SSH_SERVICE_CONNECTION_LEN
@@ -227,7 +227,7 @@ out:
/* Check that the username exists and isn't disallowed (root), and has a valid shell.
* returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */
-static int checkusername(unsigned char *username, unsigned int userlen) {
+static int checkusername(char *username, unsigned int userlen) {
char* listshell = NULL;
char* usershell = NULL;