#define WITH_DETAIL (1)
#endif
+#ifndef WITHOUT_SESSION_MGMT
+#define WITH_SESSION_MGMT (1)
+#endif
+
/*
* See util.c
*/
rad_listen_t *proxy_listener;
#endif
- int simul_max;
+
+ int simul_max; /* see modcall.c && xlat.c */
+#ifdef WITH_SESSION_MGMT
int simul_count;
int simul_mpp; /* WEIRD: 1 is false, 2 is true */
+#endif
int options; /* miscellanous options */
const char *module; /* for debugging unresponsive children */
int rad_authenticate(REQUEST *request)
{
VALUE_PAIR *namepair;
- VALUE_PAIR *check_item;
VALUE_PAIR *auth_item = NULL;
VALUE_PAIR *module_msg;
VALUE_PAIR *tmp = NULL;
int result;
- char umsg[MAX_STRING_LEN + 1];
- const char *user_msg = NULL;
const char *password;
- char logstr[1024];
char autz_retry = 0;
int autz_type = 0;
}
}
+#ifdef WITH_SESSION_MGMT
if (result >= 0 &&
(check_item = pairfind(request->config_items, PW_SIMULTANEOUS_USE)) != NULL) {
int r, session_type = 0;
+ VALUE_PAIR *check_item;
+ char logstr[1024];
+ char umsg[MAX_STRING_LEN + 1];
+ const char *user_msg = NULL;
tmp = pairfind(request->config_items, PW_SESSION_TYPE);
if (tmp) {
}
}
}
+#endif
/*
* Result should be >= 0 here - if not, it means the user
return indexed_modcall(RLM_COMPONENT_ACCT, acct_type, request);
}
+#ifdef WITH_SESSION_MGMT
/*
* See if a user is already logged in.
*
return (request->simul_count < maxsimul) ? 0 : request->simul_mpp;
}
+#endif
+#ifdef WITH_PROXY
/*
* Do pre-proxying for ALL configured sessions
*/
{
return indexed_modcall(RLM_COMPONENT_POST_PROXY, type, request);
}
+#endif
/*
* Do post-authentication for ALL configured sessions
RCSID("$Id$")
#include <freeradius-devel/radiusd.h>
+#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
+#ifdef WITH_SESSION_MGMT
/*
* End a session by faking a Stop packet to all accounting modules.
*/
return 2;
}
#endif
+
+#else
+/* WITH_SESSION_MGMT */
+
+int session_zap(UNUSED REQUEST *request, UNUSED uint32_t nasaddr, UNUSED unsigned int port,
+ UNUSED const char *user,
+ UNUSED const char *sessionid, UNUSED uint32_t cliaddr, UNUSED char proto,
+ UNUSED int session_time)
+{
+ return RLM_MODULE_FAIL;
+}
+
+int rad_check_ts(UNUSED uint32_t nasaddr, UNUSED unsigned int portnum,
+ UNUSED const char *user, UNUSED const char *session_id)
+{
+ radlog(L_ERR, "Simultaneous-Use is not supported");
+ return 2;
+}
+#endif