mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
adtrustinstance: make sure to stop and disable winbind in uninstall()
Reviewed-By: Martin Kosek <mkosek@redhat.com>
This commit is contained in:
committed by
Martin Kosek
parent
3a7ba6013f
commit
e99fa380af
@@ -889,12 +889,15 @@ class ADTRUSTInstance(service.Service):
|
|||||||
self.restore_state("running")
|
self.restore_state("running")
|
||||||
self.restore_state("enabled")
|
self.restore_state("enabled")
|
||||||
|
|
||||||
|
winbind = ipaservices.service("winbind")
|
||||||
# Always try to stop and disable smb service, since we do not leave
|
# Always try to stop and disable smb service, since we do not leave
|
||||||
# working configuration after uninstall
|
# working configuration after uninstall
|
||||||
try:
|
try:
|
||||||
self.stop()
|
self.stop()
|
||||||
self.disable()
|
self.disable()
|
||||||
except:
|
winbind.stop()
|
||||||
|
winbind.disable()
|
||||||
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Since we do not guarantee restoring back to working samba state,
|
# Since we do not guarantee restoring back to working samba state,
|
||||||
@@ -907,7 +910,7 @@ class ADTRUSTInstance(service.Service):
|
|||||||
try:
|
try:
|
||||||
ipautil.run(["/usr/sbin/setsebool",
|
ipautil.run(["/usr/sbin/setsebool",
|
||||||
"-P", var, sebool_state])
|
"-P", var, sebool_state])
|
||||||
except:
|
except Exception:
|
||||||
self.print_msg(SELINUX_WARNING % dict(var=var))
|
self.print_msg(SELINUX_WARNING % dict(var=var))
|
||||||
|
|
||||||
# Remove samba's credentials cache
|
# Remove samba's credentials cache
|
||||||
|
|||||||
Reference in New Issue
Block a user