summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 33c16ecd00..68b0f72151 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -116,7 +116,11 @@ def get_credentials(lp):
creds.set_machine_account(lp)
creds.set_krb_forwardable(credentials.NO_KRB_FORWARDABLE)
(tmp_fd, ccachename) = tempfile.mkstemp()
- creds.get_named_ccache(lp, ccachename)
+ try:
+ creds.get_named_ccache(lp, ccachename)
+ except RuntimeError as e:
+ os.unlink(ccachename)
+ raise e
class dnsobj(object):