[PATCH] samba-tool sites subnet

Andrew Bartlett abartlet at samba.org
Fri Oct 16 03:58:40 UTC 2015


On Fri, 2015-10-16 at 15:16 +1300, Douglas Bagnall wrote:
> hello,
> 
> These patches allow you to add a subnet to a site using a command
> like
> 
>     samba-tool sites subnet create 1.2.3.0/24 $site_name
> 
> but prevent you from adding syntactically invalid subnets. The
> subnets
> follow the CIDR definition in RFC 4632 and MS-ADTS (v20150630)
> 6.1.1.2.2.2.1 "Subnet Object". I believe these are functionally
> equivalent -- if not, I don't know which we violate. It also works
> with IPv6.
> 
> There are also these subcommands:
> 
>     samba-tool sites subnet set-site 1.2.3.0/24 $site2
>     samba-tool sites subnet delete 1.2.3.0/24
> 
> which would shift the subnet from one site object to another, then
> delete it.
> 
> Along the way we make minor improvements to the existing samba-tool
> sites sub-command and its tests.

Reviewed-by: Andrew Bartlett <abartlet at samba.org>

We still need to cover preventing renames from creating invalid CIDR
ranges, but this isn't a regression, so getting this in would be a big
step forward.

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba









More information about the samba-technical mailing list