]> git.tuebingen.mpg.de Git - paraslash.git/commit
Put IPv4-specific parts inside the ACL subsystem
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sat, 7 Feb 2009 19:16:50 +0000 (20:16 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 16 Feb 2009 16:45:00 +0000 (17:45 +0100)
commit5d67c3dcd623fb61ca6ec4b427eeeb51daeca71e
treec459afd2a415763ef03c5c1cb4a1e0f0c9e26e3f
parent8e300aadc904a0e8b7453be4fb571f68bab6234c
Put IPv4-specific parts inside the ACL subsystem

The ACL subsystem performs access validation based on IPv4 address /
netmask pairs. Since the internals of this system are exposed via
struct sender_command_data, other subsystems can only use IPv4.

This patch migrates the IPv4-specific parts of the ACL subsystem inside
that system and replaces the 'struct in_addr' address with a host
string. A subsequent patch converts the remaining subsystems to also
use strings instead of AF-dependent addresses.

For the present purpose the string size (fixed) is over-dimensioned,
since a valid IPv4 address contains at most 15 = 4*3 + 3 + 1 bytes
(including the 3 dots and the '\0'). The size should also be sufficient
for hostnames, since RFC 1123, 2.1 suggests a maximum length of 255.

Since the conversion string -> struct in_addr now happens later,
syntax checks have been added for argument strings.
acl.c
acl.h
command.c
net.h
send_common.c
server.h