]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
move user handling code into seperate functions
[paraslash.git] / command.c
index c4229d4f21a8d8f0ec43d66ba1a7d35ed4acda4f..5da5833ba3fb953d7ccdfe521ddc5f14632fb4f8 100644 (file)
--- a/command.c
+++ b/command.c
@@ -19,7 +19,6 @@
 /** \file command.c does client authentication and executes server commands */
 
 #include <sys/time.h> /* gettimeofday */
-#include "crypt.h"
 #include "server.cmdline.h"
 #include "db.h"
 #include "server.h"
@@ -32,6 +31,7 @@
 #include "daemon.h"
 #include "string.h"
 #include "fd.h"
+#include "user_list.h"
 
 static RC4_KEY rc4_recv_key;
 static RC4_KEY rc4_send_key;
@@ -1022,7 +1022,7 @@ int handle_connect(int fd, struct sockaddr_in *addr)
        int numbytes, ret, argc, use_rc4 = 0;
        char buf[STRINGSIZE];
        unsigned char crypt_buf[MAXLINE];
-       struct _user u;
+       struct user u;
        struct server_command *cmd = NULL;
        long unsigned challenge_nr, chall_response;
        char **argv = NULL;
@@ -1062,7 +1062,7 @@ int handle_connect(int fd, struct sockaddr_in *addr)
        }
        PARA_DEBUG_LOG("received %s request for user %s\n",
                use_rc4? "rc4" : "auth", u.name);
-       if ((ret = _get_user(&u)) < 0)
+       if ((ret = get_user(&u)) < 0)
                goto err_out;
        if (!ret) { /* user not found */
                PARA_WARNING_LOG("auth request for unknown user %s\n", u.name);