]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_pas2.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_pas2.c
index c3f31cea3d9c66ab81acbb3eab1a2518c8e8f4cc..fd7fbf246dc94513c684bffe5a28ca3264ccfa9b 100644 (file)
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
-#include "sysdep_decls.h"
 #include "citadel.h"
 #include "server.h"
 #include "citserver.h"
 #include "support.h"
-#include "serv_extensions.h"
 #include "user_ops.h"
 #include "md5.h"
 #include "tools.h"
 
 
+#include "ctdl_module.h"
+
+
 void cmd_pas2(char *argbuf)
 {
-       char pw[SIZ];
+       char pw[256];
        char hexstring[MD5_HEXSTRING_SIZE];
        
 
@@ -50,7 +51,7 @@ void cmd_pas2(char *argbuf)
                return;
        }
        
-       extract(pw, argbuf, 0);
+       extract_token(pw, argbuf, 0, '|', sizeof pw);
        
        if (getuser(&CC->user, CC->curr_user))
        {
@@ -85,8 +86,10 @@ void cmd_pas2(char *argbuf)
 
 
 
-char *serv_pas2_init(void)
+CTDL_MODULE_INIT(pas2)
 {
         CtdlRegisterProtoHook(cmd_pas2, "PAS2", "APOP-based login");
+
+       /* return our Subversion id for the Log */
         return "$Id$";
 }