Fajar A. Nugraha [Mon, 16 Jan 2012 07:42:29 +0000 (14:42 +0700)]
Updated preinst, postinst, and prerm script from Debian's 2.1.10+dfsg-2
This commit applies changes to preinst, postinst, and prerm script on
Debian's 2.1.10+dfsg-2, by Josip Rodin <joy-packages@debian.org>.
Relevant changelog from Debian's 2.1.10+dfsg-2 changelog:
...
We now have to send SIGHUP to the daemon as a postrotate
action, which makes it reopen log files and continue normally.
...
* However, the latter signal also makes the server re-read configuration
files, but unlike the initial server start, this all happens under
the unprivileged user. That in turn means that if by any chance there
is any part of FR configuration that happens not to be readable by
group freerad (or whatever non-default is configured), the reload
will fail, effectively silently, as the log has been moved away. Gah.
So we have to make an effort to ensure that the configuration files
are still readable by that user, otherwise the reload fails and the
aforementioned bug is not fixed. The files seem to revert to
root:root upon conffile actions, at least that's what happened to me
and I think that was the cause. So, on upgrade, try to re-apply the
dpkg-statoverrides on our /etc/freeradius/* stuff, whatever they are,
under the assumption they will let the freerad group read config files
as is the initial setup. (I wish dpkg-statoverride --update $file
just did the right thing, but it doesn't, so there's a new local
function that does that.)
* While doing the latter, noticed that we were checking for directories
in dpkg-statoverride --list output with trailing slashes, but they
get output without it, so it was a no-op. Fixed the check by removing
the trailing slashes. Also then noticed that we were grepping --list
output, but it takes an optional glob pattern, so saved us that
pointless grep fork by using that facility, just as described in the
policy manual.
Fajar A. Nugraha [Mon, 16 Jan 2012 07:26:22 +0000 (14:26 +0700)]
Updated freeradius.logrotate from Debian's 2.1.10+dfsg-2
This commit applies changes to debian/freeradius.logrotate on Debian's
2.1.10+dfsg-2, by Josip Rodin <joy-packages@debian.org>.
Relevant changelog from Debian's 2.1.10+dfsg-2 changelog:
Since 2.1.9, the daemon stopped reopening the default radius.log file
constantly, which means the default logrotate setup breaks the default
logging. D'oh. We now have to send SIGHUP to the daemon as a postrotate
action, which makes it reopen log files and continue normally.
* Added delaycompress to the logrotate options, just to be on the safe
side.
* Added a reload action into the init script accordingly, so that the
right pidfile is picked up (one that can be overridden by the admin
in /etc/default/freeradius, available since the last release).
* Called reload from the postrotate section, closes: #602815.
Alan T. DeKok [Thu, 29 Dec 2011 22:50:18 +0000 (17:50 -0500)]
Use correct method of recursing into subdirs
Since commit 0347cacfe0f470353, we have a better way of recursing
into subdirs. Having an explicit test for $(RLM_SUBDIRS), and
then manually recursing into them is wrong. It causes modules
like rlm_eap to be built twice.
Instead, remove the test for $(RLM_SUBDIRS), and make
$(TARGET).la depend on $(RLM_SUBDIRS)
Renaud Métrich [Mon, 26 Dec 2011 16:43:22 +0000 (17:43 +0100)]
Added 'interface_ipaddr' configuration parameter to help freeradius send the DHCP reply packet using interface's IP address as source, and not 'ipaddr' which may be 255.255.255.255 when listening for broadcasts
Alan T. DeKok [Mon, 19 Dec 2011 20:44:37 +0000 (15:44 -0500)]
Use "last_found" in a thread-safe manner
It's a thread-local variable, not a variable global to the
configuration.
Note also that much of the rest of the module is poor.
Re-reading the files for every packet is HORRIBLE. It causes
more threading issues.
Fixed-size hash tables are similarly poor practice.
Alan T. DeKok [Thu, 17 Nov 2011 11:00:42 +0000 (12:00 +0100)]
Include copyright lines
This is for people who can't be bothered to give attribution
where it's due. The dictionary files we have here give authors,
origins, web pages, etc. where possible. It's only reasonable
for others to do the same.
Sadly, that's asking too much of some people. So we've added
explicit copyright statements so that people have no excuse.