Imported Upstream version 0.66.1
[hcoop/debian/courier-authlib.git] / authdaemon.c
index 7fdf2a0..927536c 100644 (file)
@@ -1,10 +1,10 @@
 /*
-** Copyright 2000-2005 Double Precision, Inc.  See COPYING for
+** Copyright 2000-2008 Double Precision, Inc.  See COPYING for
 ** distribution information.
 */
 
 #include       "auth.h"
-#include       "authstaticlist.h"
+#include       "courierauthstaticlist.h"
 #include       "courierauthsasl.h"
 #include       "authwait.h"
 #include       "courierauthdebug.h"
@@ -18,7 +18,6 @@
 #include       <sys/select.h>
 #include       "numlib/numlib.h"
 
-static const char rcsid[]="$Id: authdaemon.c,v 1.17 2005/06/30 16:16:07 mrsam Exp $";
 
 extern int authdaemondo(const char *authreq,
        int (*func)(struct authinfo *, void *), void *arg);
@@ -55,7 +54,10 @@ int auth_generic(const char *service,
        strcat(strcat(buf, authtype), "\n");
        strcat(buf, authdata);
 
-       rc=authdaemondo(buf, callback_func, callback_arg);
+       rc=strcmp(authtype, "EXTERNAL") == 0
+               ? auth_getuserinfo(service, authdata, callback_func,
+                                  callback_arg)
+               : authdaemondo(buf, callback_func, callback_arg);
        free(buf);
 
        if (courier_authdebug_login_level)