mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-25 16:31:08 -06:00
adtrustinstance: Make sure smb.conf exists
The 'net' command fails unless smb.conf exists. Touch the file prior to any 'net' call to make sure we do not crash for this very reason. https://fedorahosted.org/freeipa/ticket/5687 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
34db5759fa
commit
24a39dea44
@ -520,6 +520,11 @@ class ADTRUSTInstance(service.Service):
|
||||
os.write(tmp_fd, conf)
|
||||
os.close(tmp_fd)
|
||||
|
||||
# Workaround for: https://fedorahosted.org/freeipa/ticket/5687
|
||||
# We make sure that paths.SMB_CONF file exists, hence touch it
|
||||
with open(paths.SMB_CONF, 'a'):
|
||||
os.utime(paths.SMB_CONF, None)
|
||||
|
||||
args = [paths.NET, "conf", "import", tmp_name]
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user