]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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)
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.


No differences found