mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
samba-tool classicupgrade: Remove unsued upgrade_smbconf
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Jan 23 23:51:56 CET 2014 on sn-devel-104
This commit is contained in:
@ -371,123 +371,6 @@ def import_wins(samba4_winsdb, samba3_winsdb):
|
|||||||
"maxVersion": str(version_id)})
|
"maxVersion": str(version_id)})
|
||||||
|
|
||||||
|
|
||||||
smbconf_keep = [
|
|
||||||
"dos charset",
|
|
||||||
"unix charset",
|
|
||||||
"display charset",
|
|
||||||
"comment",
|
|
||||||
"path",
|
|
||||||
"directory",
|
|
||||||
"workgroup",
|
|
||||||
"realm",
|
|
||||||
"netbios name",
|
|
||||||
"netbios aliases",
|
|
||||||
"netbios scope",
|
|
||||||
"server string",
|
|
||||||
"interfaces",
|
|
||||||
"bind interfaces only",
|
|
||||||
"security",
|
|
||||||
"auth methods",
|
|
||||||
"encrypt passwords",
|
|
||||||
"null passwords",
|
|
||||||
"obey pam restrictions",
|
|
||||||
"password server",
|
|
||||||
"smb passwd file",
|
|
||||||
"private dir",
|
|
||||||
"passwd chat",
|
|
||||||
"lanman auth",
|
|
||||||
"ntlm auth",
|
|
||||||
"client NTLMv2 auth",
|
|
||||||
"client lanman auth",
|
|
||||||
"client plaintext auth",
|
|
||||||
"read only",
|
|
||||||
"hosts allow",
|
|
||||||
"hosts deny",
|
|
||||||
"log level",
|
|
||||||
"debuglevel",
|
|
||||||
"log file",
|
|
||||||
"smb ports",
|
|
||||||
"large readwrite",
|
|
||||||
"max protocol",
|
|
||||||
"min protocol",
|
|
||||||
"unicode",
|
|
||||||
"read raw",
|
|
||||||
"write raw",
|
|
||||||
"disable netbios",
|
|
||||||
"nt status support",
|
|
||||||
"max mux",
|
|
||||||
"max xmit",
|
|
||||||
"name resolve order",
|
|
||||||
"max wins ttl",
|
|
||||||
"min wins ttl",
|
|
||||||
"time server",
|
|
||||||
"unix extensions",
|
|
||||||
"use spnego",
|
|
||||||
"server signing",
|
|
||||||
"client signing",
|
|
||||||
"max connections",
|
|
||||||
"paranoid server security",
|
|
||||||
"socket options",
|
|
||||||
"strict sync",
|
|
||||||
"max print jobs",
|
|
||||||
"printable",
|
|
||||||
"print ok",
|
|
||||||
"printer name",
|
|
||||||
"printer",
|
|
||||||
"map system",
|
|
||||||
"map hidden",
|
|
||||||
"map archive",
|
|
||||||
"preferred master",
|
|
||||||
"prefered master",
|
|
||||||
"local master",
|
|
||||||
"browseable",
|
|
||||||
"browsable",
|
|
||||||
"wins server",
|
|
||||||
"wins support",
|
|
||||||
"csc policy",
|
|
||||||
"strict locking",
|
|
||||||
"preload",
|
|
||||||
"auto services",
|
|
||||||
"lock dir",
|
|
||||||
"lock directory",
|
|
||||||
"pid directory",
|
|
||||||
"socket address",
|
|
||||||
"copy",
|
|
||||||
"include",
|
|
||||||
"available",
|
|
||||||
"volume",
|
|
||||||
"fstype",
|
|
||||||
"panic action",
|
|
||||||
"msdfs root",
|
|
||||||
"host msdfs",
|
|
||||||
"winbind separator"]
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade_smbconf(oldconf, mark):
|
|
||||||
"""Remove configuration variables not present in Samba4
|
|
||||||
|
|
||||||
:param oldconf: Old configuration structure
|
|
||||||
:param mark: Whether removed configuration variables should be
|
|
||||||
kept in the new configuration as "samba3:<name>"
|
|
||||||
"""
|
|
||||||
data = oldconf.data()
|
|
||||||
newconf = LoadParm()
|
|
||||||
|
|
||||||
for s in data:
|
|
||||||
for p in data[s]:
|
|
||||||
keep = False
|
|
||||||
for k in smbconf_keep:
|
|
||||||
if smbconf_keep[k] == p:
|
|
||||||
keep = True
|
|
||||||
break
|
|
||||||
|
|
||||||
if keep:
|
|
||||||
newconf.set(s, p, oldconf.get(s, p))
|
|
||||||
elif mark:
|
|
||||||
newconf.set(s, "samba3:" + p, oldconf.get(s, p))
|
|
||||||
|
|
||||||
return newconf
|
|
||||||
|
|
||||||
SAMBA3_PREDEF_NAMES = {
|
SAMBA3_PREDEF_NAMES = {
|
||||||
'HKLM': registry.HKEY_LOCAL_MACHINE,
|
'HKLM': registry.HKEY_LOCAL_MACHINE,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user