summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-02-01 16:10:19 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-02-03 12:16:13 -0500
commitc9f6ca2ca7399c301853ff774c20883fef2b2267 (patch)
tree71c6249be6dc8a4be3e2a77e24d414db12d8a55a /src/tools
parentc210c160f6b82b6e2369f2a2fba6ea559ee54dbe (diff)
downloadsssd-c9f6ca2ca7399c301853ff774c20883fef2b2267.tar.gz
sssd-c9f6ca2ca7399c301853ff774c20883fef2b2267.tar.xz
sssd-c9f6ca2ca7399c301853ff774c20883fef2b2267.zip
Make the domain argument mandatory in sss_obfuscate
It doesn't make sense to set a "default" domain. We should require that the domain always be specified.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sss_obfuscate8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/sss_obfuscate b/src/tools/sss_obfuscate
index cd9116151..faa2d981a 100644
--- a/src/tools/sss_obfuscate
+++ b/src/tools/sss_obfuscate
@@ -19,8 +19,8 @@ def parse_options():
dest="stdin", default=False,
help="Read the password from stdin.")
parser.add_option("-d", "--domain",
- dest="domain", default="default",
- help="The domain to use the password in (default: default)",
+ dest="domain", default=None,
+ help="The domain to use the password in (mandatory)",
metavar="DOMNAME")
parser.add_option("-f", "--file",
dest="filename", default=None,
@@ -40,6 +40,10 @@ def main():
print >> sys.stderr, "Cannot parse options"
return 1
+ if not options.domain:
+ print >> sys.stderr, "No domain specified"
+ return 1
+
if not options.stdin and not options.password:
pprompt = lambda: (getpass.getpass("Enter password: "), getpass.getpass("Re-enter password: "))
p1, p2 = pprompt()