jcarneal [Tue, 21 Nov 2000 23:58:23 +0000 (23:58 +0000)]
Jeff Carneal <jeff@apex.net>
Bugfixes. Auth-type counting problem in rad_check_password().
Updated pairfree() calls with '&'
aland [Tue, 21 Nov 2000 21:24:59 +0000 (21:24 +0000)]
removed 'allowed' and 'trusted' attributes from the proxy receive
code. A module will replace this functionality.
aland [Tue, 21 Nov 2000 21:02:00 +0000 (21:02 +0000)]
pull the definition for CC out of the top-level Make.inc file.
bug found by David Kerry <dk@snti.com>
aland [Tue, 21 Nov 2000 20:47:59 +0000 (20:47 +0000)]
more examples of realms
aland [Tue, 21 Nov 2000 20:44:35 +0000 (20:44 +0000)]
minor re-formatting.
allow NULL realms. Bug found by David Kerry <dk@snti.com>
aland [Tue, 21 Nov 2000 20:22:40 +0000 (20:22 +0000)]
radclient now does it's own encryption of the Password and
CHAP-Password attributes. This change is because of the last
bug fix to lib/radius.c
aland [Tue, 21 Nov 2000 20:16:11 +0000 (20:16 +0000)]
when doing a rad_send(), do NOT encode the PW_PASSWORD or the
PW_CHAP_PASSWORD attribute. This is to prevent double encryption.
This also prevents the server from breaking the CHAP-Password
when doing proxying. Bug found by David Kerry <dk@snti.com>
aland [Tue, 21 Nov 2000 20:06:03 +0000 (20:06 +0000)]
patch from David Kerry <dk@snti.com> to properly define variables
aland [Tue, 21 Nov 2000 20:04:23 +0000 (20:04 +0000)]
ALWAYS use our own 'install-sh' program, as we cannot depend
on the system's one.
aland [Tue, 21 Nov 2000 18:31:07 +0000 (18:31 +0000)]
updated dependencies on include files
aland [Tue, 21 Nov 2000 18:30:07 +0000 (18:30 +0000)]
convince the thrice-damned ltldl code to actually open "foo.a",
like it's supposed to, like it claims to, but which it doesn't
do, until I've drop-kicked the fix through it's thick head.
aland [Tue, 21 Nov 2000 16:46:10 +0000 (16:46 +0000)]
use the new 'request->number' to uniquely tag each request
aland [Mon, 20 Nov 2000 21:51:47 +0000 (21:51 +0000)]
<whew>! Finally made the 'request_list' structure 'static'
to request_list.c. This allows us to completely change the
implementation, without breaking any external code.
Removed all references to 'request_list_busy' from radiusd.c
These sort of checks should be in request_list.c. (Not that
they're actually there right now...)
aland [Mon, 20 Nov 2000 21:36:51 +0000 (21:36 +0000)]
removed old code handling stripped-user-name from the 'authorize'
entry. That functionality is now done by rlm_preprocess
aland [Mon, 20 Nov 2000 21:31:22 +0000 (21:31 +0000)]
minor cleanups & touchups, to make the code simpler
aland [Mon, 20 Nov 2000 20:37:26 +0000 (20:37 +0000)]
added comment header with description of GPL.
added 'libradius.h' to top of includes, to fix include file
order.
aland [Mon, 20 Nov 2000 19:43:55 +0000 (19:43 +0000)]
updated arguments to pairfree()
aland [Mon, 20 Nov 2000 18:59:13 +0000 (18:59 +0000)]
changes as per latest discussion on the list
aland [Mon, 20 Nov 2000 17:56:13 +0000 (17:56 +0000)]
added a 'number' element to the REQUEST structure. This is a
unique value per request, incrementing for each new request.
This allows the debug messages to print out 'request NNNN',
which makes it easier for the administrator to correlate
log messages.
aland [Mon, 20 Nov 2000 16:54:05 +0000 (16:54 +0000)]
walk over 255 or 256 ID's
aland [Mon, 20 Nov 2000 16:50:00 +0000 (16:50 +0000)]
updated arguments to pairfree() and rad_free()
aland [Mon, 20 Nov 2000 16:48:55 +0000 (16:48 +0000)]
updated the arguments to pairfree()
aland [Mon, 20 Nov 2000 16:48:21 +0000 (16:48 +0000)]
updated arguments to pairfree()
aland [Mon, 20 Nov 2000 16:35:42 +0000 (16:35 +0000)]
made pairfree() take a VALUE_PAIR**, not a VALUE_PAIR*. This
allows it to set the input pointer to NULL.
aland [Mon, 20 Nov 2000 16:23:00 +0000 (16:23 +0000)]
made a request_free() and rad_free() take a '**' pointer, instead
of a '*' pointer. This allows those functions to set the input
variable to NULL, to explicitely tell the caller it's no longer
valid.
It also minimizes the code, as there was a lot of:
rad_free(foo);
foo = NULL;
jcarneal [Sat, 18 Nov 2000 18:08:30 +0000 (18:08 +0000)]
Jeff Carneal <jeff@apex.net>
Changed lower/nospace code slightly. It's now more configurable, if
slightly less efficient. You can now specify when to lower/nospace
both the user and the pass, rather than always doing both at the
same time.
jcarneal [Sat, 18 Nov 2000 16:44:17 +0000 (16:44 +0000)]
Jeff Carneal <jeff@apex.net>
Bugfig. Need to explicitly set the config item list to NULL
after freeing.
jcarneal [Sat, 18 Nov 2000 16:43:33 +0000 (16:43 +0000)]
Jeff Carneal <jeff@apex.net>
Bugfix. rl_next was returning the same request it was passed.
This hopefully fixes that.
aland [Fri, 17 Nov 2000 21:14:25 +0000 (21:14 +0000)]
new function: rl_num_requests(), which returns the number of
requests in the request list.
After this, there's only one more reference to the request_list
data structure, outside of request_list.c
aland [Fri, 17 Nov 2000 20:37:38 +0000 (20:37 +0000)]
miscellanous cleanups, and do NOT set the timestamp to zero.
Let refresh_request() take care of figuring out which requests
to delete.
aland [Fri, 17 Nov 2000 19:38:53 +0000 (19:38 +0000)]
be a little neater about checking last_request in rad_clean_list
jcarneal [Fri, 17 Nov 2000 19:08:29 +0000 (19:08 +0000)]
Bugfix. pairfree(), not pairlist_free().
aland [Fri, 17 Nov 2000 18:33:37 +0000 (18:33 +0000)]
Modified code to do intermediate processing of the request list,
as posted to the freeradius-devel list.
After spawning a new thread/process, the server now checks a few
old requests for deletion/proxy-retry/etc. This amortizes the
work over each second, and helps to minimize the bursty response
of the server.
aland [Fri, 17 Nov 2000 16:11:39 +0000 (16:11 +0000)]
added rl_next() function, which walks through the request list one
entry at a time.
aland [Fri, 17 Nov 2000 15:33:09 +0000 (15:33 +0000)]
two new functions: radutmp_lock() and radutmp_unlock(), to wrap
the platform-dependent lock functions, so that we have fewer
ifdef's in the code.
Also, when calling rad_check_ts, do unlock/check/lock, so that
we don't block other users from accessing the utmp file.
jcarneal [Fri, 17 Nov 2000 15:21:56 +0000 (15:21 +0000)]
Jeff Carneal <jeff@apex.net>
Bugfix on lower case stuff.
aland [Fri, 17 Nov 2000 15:20:11 +0000 (15:20 +0000)]
update long name with network & mask
aland [Thu, 16 Nov 2000 22:24:51 +0000 (22:24 +0000)]
added new 'component_names' array, which contains the component
names. This is so that we don't have multiple copies of them
all over the place....
aland [Thu, 16 Nov 2000 22:16:59 +0000 (22:16 +0000)]
removed multiple variables 'authorize', 'authenticate', etc, and
moved them to a 'components' array, keyed off of RLM_COMPONENT_FOO
This makes the different components act more like each other,
and will allow us to simplify the code...
aland [Thu, 16 Nov 2000 21:47:28 +0000 (21:47 +0000)]
replaced all references to 'malloc' with 'rad_malloc'
aland [Thu, 16 Nov 2000 21:47:14 +0000 (21:47 +0000)]
minor cleanups
aland [Thu, 16 Nov 2000 21:45:35 +0000 (21:45 +0000)]
point 'buf' to the answer
aland [Thu, 16 Nov 2000 21:44:48 +0000 (21:44 +0000)]
new function: rad_malloc().
It's a wrapper for malloc(), that logs an error, and calls exit()
if the allocation fails.
This is so that we don't have to litter the rest of the code with
checks for the return code from malloc().
If malloc() fails, then it's a hard, non-recoverable error. The
server MUST exit immediately. Centralizing these checks makes
the code smaller, simpler, and easier to maintain.
aland [Thu, 16 Nov 2000 21:33:28 +0000 (21:33 +0000)]
removed the 'default_auth_type' from the main module list structure
deleted the 'indexed_module_config_t', by adding 'index' to the
'module_config_t' structure, and having all other component types
ignore it.
This allows us to delete a lot of otherwise duplicated code.
aland [Thu, 16 Nov 2000 16:55:22 +0000 (16:55 +0000)]
moved more code into the request_list source file. Cleaned up
some algorithms so they're independent of the number of requests
in the list, instead of O(N)
aland [Thu, 16 Nov 2000 16:42:53 +0000 (16:42 +0000)]
updated for latest changes
aland [Thu, 16 Nov 2000 16:34:24 +0000 (16:34 +0000)]
added PAM configuration section.
aland [Thu, 16 Nov 2000 16:30:24 +0000 (16:30 +0000)]
allowed the PAM module to read it's Pam-Auth name from the
radiusd.conf configuration file.
aland [Thu, 16 Nov 2000 16:29:34 +0000 (16:29 +0000)]
cleaned up the example module
jcarneal [Tue, 14 Nov 2000 23:56:01 +0000 (23:56 +0000)]
Jeff Carneal <jeff@apex.net>
Bugfix for default entries list.
jcarneal [Tue, 14 Nov 2000 23:00:08 +0000 (23:00 +0000)]
Jeff Carneal <jeff@apex.net>
Updated fastusers with 'hash_reload = N' config item, where N is the number
of seconds between hash rebuilds. This allows us to not HUP the server
and yet still refresh our hash list on a reasonable schedule.
jcarneal [Tue, 14 Nov 2000 02:27:06 +0000 (02:27 +0000)]
Added request_list.o to SERVER_OBJS.
aland [Mon, 13 Nov 2000 22:01:01 +0000 (22:01 +0000)]
cleaned up & re-arranged more code, for refresh_request.
aland [Mon, 13 Nov 2000 20:59:31 +0000 (20:59 +0000)]
removed old PAM code. It's now in rlm_pam
aland [Mon, 13 Nov 2000 20:59:07 +0000 (20:59 +0000)]
new files to handle the REQUEST_LIST data structure, and to
hide that information from the main server core.
Updated the server core to (mostly) use the new API, as posted
to the list Tue, 07 Nov 2000. There's still work to do, however.
Removed the 'setuptimout' function, and merged it's functionality
into rad_clean_list(), so there is now only one pass over the entire
request list.
jcarneal [Mon, 13 Nov 2000 19:07:20 +0000 (19:07 +0000)]
Jeff Carneal <jeff@apex.net>
Bugfix. Value name is dval->name, not dval->attrname.
aland [Mon, 13 Nov 2000 17:41:05 +0000 (17:41 +0000)]
removed old 'radius_xlate' function, and replaced all references
to it, with 'radius_xlat2'.
Updated the parameters passed to 'radius_exec', in order to allow
it to pass the correct parameters to radius_xlat2
aland [Mon, 13 Nov 2000 17:40:02 +0000 (17:40 +0000)]
deleted unneeded 'fixme', and cleaned up comments
aland [Mon, 13 Nov 2000 17:39:46 +0000 (17:39 +0000)]
minor typo update
aland [Mon, 13 Nov 2000 17:23:50 +0000 (17:23 +0000)]
removed extraneous 'VALUE_PAIR *reply' from radius_xlat2 function
jcarneal [Fri, 10 Nov 2000 22:13:18 +0000 (22:13 +0000)]
Bugfix. Was creating 'detail' as directory.
aland [Fri, 10 Nov 2000 21:15:02 +0000 (21:15 +0000)]
seperated include for libradius.h from radiusd.h. The include
for libradius.h is now near the top of the include list, after
autoconf.h, and before any system includes.
We then have radiusd.h (which includes missing.h).
This new order should hopefully minimize problems with include
file order on different platforms
aland [Fri, 10 Nov 2000 20:51:25 +0000 (20:51 +0000)]
added PW_TYPE_SUBSECTION for configuration file parser, so that
it can automagically walk through subsections, too.
aland [Fri, 10 Nov 2000 20:35:09 +0000 (20:35 +0000)]
removed dependence on RADIUS_PID, and get the config information
from the new configuration, instead of hard-coding it in at
compile time.
jcarneal [Fri, 10 Nov 2000 20:11:29 +0000 (20:11 +0000)]
Jeff Carneal <jeff@apex.net>
Clean up logging in auth.c with new 'rad_authlog' function.
Split log_auth_pass config item into:
log_auth_badpass
log_auth_goodpass
This is more in keeping with cistron compatibility.
aland [Fri, 10 Nov 2000 18:52:08 +0000 (18:52 +0000)]
removed duplicated 'read NAS' code from the source.
It still doesn't read the 'radiusd.conf' file, which it SHOULD,
but those changes can be made later.
aland [Fri, 10 Nov 2000 16:31:51 +0000 (16:31 +0000)]
removed a number of defines which are not needed any more
aland [Fri, 10 Nov 2000 16:30:03 +0000 (16:30 +0000)]
removed dependencies on #define's for location of configuration file
aland [Fri, 10 Nov 2000 16:28:33 +0000 (16:28 +0000)]
removed dependence in #define's, for where the files are located
aland [Fri, 10 Nov 2000 16:24:25 +0000 (16:24 +0000)]
removed dependencies on hard-coded #define's. Use configured
values.
aland [Fri, 10 Nov 2000 16:16:50 +0000 (16:16 +0000)]
deleted hard-coded RADWTMP, and moved it to a configuration file
directive
hartwick [Fri, 10 Nov 2000 15:02:55 +0000 (15:02 +0000)]
* Update to reflect the use of rad_mkdir() to recursively make the
directories.
pam [Fri, 10 Nov 2000 08:53:48 +0000 (08:53 +0000)]
Fixed typo, which broke compilation of the module.
Fixed couple warnings during compilation.
aland [Thu, 9 Nov 2000 19:11:54 +0000 (19:11 +0000)]
moved rad_mkdir() to main/util.c, where other modules can make
use of it.
aland [Thu, 9 Nov 2000 19:11:17 +0000 (19:11 +0000)]
removed old build_reply() function.
Added new rad_mkdir function
aland [Thu, 9 Nov 2000 19:06:38 +0000 (19:06 +0000)]
added 'netmask' to RADCLIENT data structure.
Define rad_mkdir() function
aland [Thu, 9 Nov 2000 19:05:55 +0000 (19:05 +0000)]
included header file for ntohl() macro
aland [Thu, 9 Nov 2000 17:24:32 +0000 (17:24 +0000)]
added notes on using new ipaddr/netmask for client networks
aland [Thu, 9 Nov 2000 17:15:24 +0000 (17:15 +0000)]
added support for network masks to clients. We can now do:
192.168.0.0/16 secret1
192.168.0.0/24 secret2
192.168.0.0/32 secret3
and the client will match the most restrictive one.
aland [Thu, 9 Nov 2000 16:50:28 +0000 (16:50 +0000)]
move hostname_lookup config from radiusd.c to conffile.c
aland [Wed, 8 Nov 2000 21:22:09 +0000 (21:22 +0000)]
These files are no longer relevant. The new configuration file
does all these were proposing to do, and more.
aland [Wed, 8 Nov 2000 20:32:34 +0000 (20:32 +0000)]
support 'user' and 'group' directives, where the server does
setgid && setuid to whatever the user supplies.
This is so that the server doesn't need to run as root...
aland [Wed, 8 Nov 2000 18:47:11 +0000 (18:47 +0000)]
new rad_mkdir() function. It works just like mkdir(), but
creates *all* relevant directories, not just the last one
aland [Wed, 8 Nov 2000 17:59:52 +0000 (17:59 +0000)]
make more functions and variables 'static'
set the length of the returned SNMP variables
generic clean-ups
aland [Wed, 8 Nov 2000 17:21:12 +0000 (17:21 +0000)]
defined an SNMP data structure for auth/acct server statistics.
Updated the SNMP code to return the information.
Note that the main RADIUS code still doesn't maintain any information,
other than the total auth/acct requests. This code needs to be
written.
jcarneal [Wed, 8 Nov 2000 17:07:20 +0000 (17:07 +0000)]
Jeff Carneal <jeff@apex.net>
o Added function rad_cleandir() to sanitize directory input
o Added function rad_mkdir() to create all needed directories
aland [Wed, 8 Nov 2000 16:16:47 +0000 (16:16 +0000)]
Deleted read_config_files(), and moved it's functionality
to conffile.c: read_radius_conf_file(), radiusd.c: reread_config()
Deleted configuration parser cruft from modules.c, as it's now
done properly in conffile.c.
The configuration file parser now pulls the relevant directories
out of the configuration file, and uses those to read the rest
of the configuration file entries. The server-specific config
is still handled in radiusd.c
hartwick [Wed, 8 Nov 2000 16:12:09 +0000 (16:12 +0000)]
* Clear up a warning in reread_config which was returning a valid,
but was declared void.
* Add code to display the IP address of the NAS that is being
ignored.
hartwick [Wed, 8 Nov 2000 04:38:14 +0000 (04:38 +0000)]
* Add client_walk() prototype.
hartwick [Wed, 8 Nov 2000 04:21:09 +0000 (04:21 +0000)]
* Add a client_walk() function to walk the client list. This
function is primarily for debugging.
jcarneal [Tue, 7 Nov 2000 22:22:09 +0000 (22:22 +0000)]
Jeff Carneal <jeff@apex.net>
Changed radiusd.c to skip the request count if max_requests=0.
Essentially allowing infinite number of requests, for those
who need more rope to hang themselves.
aland [Tue, 7 Nov 2000 22:20:50 +0000 (22:20 +0000)]
removed more traces of builddbm
aland [Tue, 7 Nov 2000 20:08:43 +0000 (20:08 +0000)]
remove LDBM and BUILDDBM from the source tree
aland [Tue, 7 Nov 2000 20:07:03 +0000 (20:07 +0000)]
removed LDBM and BUILDDBM from the source tree
hartwick [Tue, 7 Nov 2000 19:24:32 +0000 (19:24 +0000)]
* Update some of the error messages to start with rlm_detail:
jcarneal [Tue, 7 Nov 2000 18:45:16 +0000 (18:45 +0000)]
Jeff Carneal <jeff@apex.net>
Fixed so that hostname_lookups = yes/no now works. Doing this required
moving the code to read radiusd.conf from files.c to radiusd.c before
files.c:read_config_files() is called.
jcarneal [Tue, 7 Nov 2000 18:23:31 +0000 (18:23 +0000)]
Jeff Carneal <jeff@apex.net>
In keeping with the default of having hostname lookups turned off, I'm
setting the dodns variable = 0 instead of =1 here. Temporary hack
until it's fixed properly.
aland [Tue, 7 Nov 2000 18:04:09 +0000 (18:04 +0000)]
removed proxy_retry() function.
Move all handling of cleanup_delay, max_request_time, proxy_retry,
into new 'refresh_request' function. This cleans up the code
a bit, and will later make it easier for us to do incremental
clean ups.
aland [Tue, 7 Nov 2000 17:09:35 +0000 (17:09 +0000)]
added configuration examples for the 'preprocess' module
aland [Tue, 7 Nov 2000 17:08:35 +0000 (17:08 +0000)]
corrected typo