Initial "gts1" commit.
[tac_plus.git] / default_v0_fn.c
index 96e0c1d..7c4c9cb 100644 (file)
    FITNESS FOR A PARTICULAR PURPOSE.
 */
 
+
 #include "tac_plus.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "default_v0_fn.h"
 #include "expire.h"
+#include "utils.h"
+#include "report.h"
+#include "pwlib.h"
+#include "choose_authen.h"             /* for "struct authen_data" */
+#include "do_author.h"                 /* for "struct identity" */
+#include "packet.h"
+#include "main.h"
+#include "cfgfile.h"
+
 
 /* internal state variables */
 #define STATE_AUTHEN_START   0 /* no requests issued */
@@ -45,6 +60,8 @@ struct private_data {
  * Return 0 if data->status is valid, otherwise 1
  */
 
+int default_v0_fn TAC_ARGS((struct authen_data *data));
+
 int
 default_v0_fn(data)
 struct authen_data *data;
@@ -97,7 +114,7 @@ struct authen_data *data;
 
        default:
            /* something awful has happened. Give up and die */
-           report(LOG_ERR, "%s: default_fn bad state %d", 
+           report(LOG_ERR, "%s: default_fn bad state %d",
                   session.peer, p->state);
            return (1);
        }
@@ -136,7 +153,7 @@ struct authen_data *data;
        /* Never authenticate this user. It's for authorization only */
        data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
        if (debug) {
-           report(LOG_DEBUG, 
+           report(LOG_DEBUG,
                   "authentication query for '%s' %s from %s rejected",
                   name && name[0] ? name : "unknown",
                   session.port, session.peer);
@@ -164,7 +181,7 @@ struct authen_data *data;
 
     default:
        data->status = TAC_PLUS_AUTHEN_STATUS_ERROR;
-       report(LOG_ERR, "%s: Bogus service value %d from packet", 
+       report(LOG_ERR, "%s: Bogus service value %d from packet",
               session.peer, data->service);
        break;
     }
@@ -185,4 +202,3 @@ struct authen_data *data;
        return (1);
     }
 }
-