git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a781b5
)
s4-samba-tool: fixed "-k no" for disabling kerberos auth
author
Andrew Tridgell
<tridge@samba.org>
Sat, 27 Nov 2010 11:03:07 +0000
(22:03 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Sat, 27 Nov 2010 13:16:37 +0000
(
00:16
+1100)
The option "-k no" was not correctly disabling kerberos in python
programs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
source4/scripting/python/samba/getopt.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/getopt.py
b/source4/scripting/python/samba/getopt.py
index 08fe692ce0323b84914b9f8b114fc6ceaa6177f4..8104faf62edda28912ac34941287cd57e814b9de 100644
(file)
--- a/
source4/scripting/python/samba/getopt.py
+++ b/
source4/scripting/python/samba/getopt.py
@@
-135,10
+135,12
@@
class CredentialsOptions(optparse.OptionGroup):
self.ipaddress = arg
def _set_kerberos(self, option, opt_str, arg, parser):
- if
bool(arg) or arg.lower() == "yes"
:
+ if
arg.lower() in ["yes", 'true', '1']
:
self.creds.set_kerberos_state(MUST_USE_KERBEROS)
- el
se
:
+ el
if arg.lower() in ["no", 'false', '0']
:
self.creds.set_kerberos_state(DONT_USE_KERBEROS)
+ else:
+ raise optparse.BadOptionErr("invalid kerberos option: %s" % arg)
def _set_simple_bind_dn(self, option, opt_str, arg, parser):
self.creds.set_bind_dn(arg)