summaryrefslogtreecommitdiff
path: root/python/samba/gpclass.py
AgeCommit message (Collapse)AuthorFilesLines
2017-11-20gpo: Add GPO unapplyDavid Mulder1-25/+216
Keep a log of applied settings, and add an option to samba_gpoupdate to allow unapply. An unapply will revert settings to a state prior to any policy application. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-20gpo: Add gpo testsDavid Mulder1-2/+5
Lays down a sysvol gpttmpl.inf with password policies, then runs the samba_gpoupdate command. Verifies policies are applied to the samdb. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-20gpoupdate: Rewrite samba_gpoupdateDavid Mulder1-154/+35
Use new python bindings and remove obsoleted code Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-20gpo: Make the gpclass more easily extensibleDavid Mulder1-17/+35
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-20gpo: Make the gpoupdate script much more reliableDavid Mulder1-21/+25
Using a static file blanks the file when samba_gpoupdate crashes. Transformed to a tdb file and added transactions. Add info logging to monitor gpo changes, etc. Also handle parse errors and log an error message, then recover. Modified the parsing code to use ConfigParser. Also, use the backslash in path names when opening smb files, otherwise it fails against a windows server. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-20gpo: Initial commit for GPO workLuke Morrison1-0/+315
Enclosed is my Summer of Code 2013 patch to have vital password GPO always applied to the Samba4 Domain Controller using a GPO update service. To try it out "make -j" your samba with the patch, apply a security password GPO and see the difference in ~20 seconds. It also takes GPO hierarchy into account. Split from "Initial commit for GPO work done by Luke Morrison" by David Mulder Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Luke Morrison <luke@hubtrek.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>