summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_spnupdate
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-31 14:07:52 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-31 18:44:06 +0000
commit971ce6c5ed214bf01cc4a767d556279f71e77f9d (patch)
tree7593723b7c20548d2925233966cfd55a8e9fd27b /source4/scripting/bin/samba_spnupdate
parent5f8adf0efd555e3595c90d4223d06b9638340b1b (diff)
downloadsamba-971ce6c5ed214bf01cc4a767d556279f71e77f9d.tar.gz
samba-971ce6c5ed214bf01cc4a767d556279f71e77f9d.tar.bz2
samba-971ce6c5ed214bf01cc4a767d556279f71e77f9d.zip
s4:scripting/bin/samba_spnupdate - also support adding all possible "servicePrincipalName"s
Diffstat (limited to 'source4/scripting/bin/samba_spnupdate')
-rwxr-xr-xsource4/scripting/bin/samba_spnupdate5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate
index 502eebaf53..c6af81f4fd 100755
--- a/source4/scripting/bin/samba_spnupdate
+++ b/source4/scripting/bin/samba_spnupdate
@@ -138,8 +138,9 @@ if not res or len(res) != 1:
machine_dn = res[0]["dn"]
old_spns = []
-for s in res[0]['servicePrincipalName']:
- old_spns.append(s)
+if "servicePrincipalName" in res[0]:
+ for s in res[0]["servicePrincipalName"]:
+ old_spns.append(s)
if opts.verbose:
print("Existing SPNs: %s" % old_spns)