summaryrefslogtreecommitdiff
path: root/python/samba/gp_parse/gp_ini.py
AgeCommit message (Collapse)AuthorFilesLines
2023-12-15python: use python3 style super statementsRob van der Linde1-9/+6
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30gp: Use read_file() instead of readfp()Joseph Sutton1-2/+2
readfp() is deprecated and could be removed in a future version of Python. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-24python compat: remove ConfigParserDavid Mulder1-4/+7
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-11python compat: remove StringIODouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2019-03-12gpo: Parse GPT.INI with Latin-1Garming Sam1-0/+11
For some reason the French version of RSAT turns accents into ISO-8859-1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13806 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-11-05python/samba/gp_parse: PY2/PY3 compat porting for gp_init.pyNoel Power1-1/+1
Fixes 1) use compat versions of ConfigParser and StringIO 2) fix sort list of XML Elements 3) open file needs to be opened in binary mode as write_pretty_xml routing uses BytesIO() object. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-11-05python/samba/gp_parse: PY3 file -> openNoel Power1-1/+1
'file' no longer exists in PY3 replace with 'open' Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-10-23python/samba/gp_parse: PY2/PY3 compat porting for gp_init.pyNoel Power1-3/+3
Fixes 1) use compat versions of ConfigParser and StringIO 2) open file needs to be opened in binary mode as write_pretty_xml routine uses BytesIO() object. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23python/samba/gp_parse: PY3 fdeploy_sids needs to use key method for sortNoel Power1-1/+1
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16fdeploy_ini: Generalize the share name SIDsGarming Sam1-1/+21
This overrides the custom entity handler defined in the top level parser. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16gp_ini: Add a scripts ini parser for better generalizationGarming Sam1-0/+15
We mark the command path argument as a network path. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16gp_ini: Add a fdeploy1 parser for better generalizationGarming Sam1-0/+77
We still fail to handle entities in fdeploy.ini (version 0) files. Here we manage to factor out some of the SIDs, but not all of them. This will be completed in a later patch. The overall idea is to split the SID values into individual XML elements and annotate them. We also note down network paths for the redirection folders. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16gp_ini: Allow better overriding of behaviour in inherited classesGarming Sam1-14/+36
We will need this to parse the parameters or section names as SIDs for fdeploy1.ini Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-08-16gp_ini: Parse .ini files in SYSVOLGarming Sam1-0/+83
These are fdeploy, scripts + psscripts as well as the GPT.ini at the top level. Note that GPT.ini has a different character encoding and we specify it here. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>