diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-02-01 16:10:19 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-02-03 12:17:48 -0500 |
commit | ce695425d92fb528ad7e5364fd375b2ddc47e352 (patch) | |
tree | 139188b53c080e9612064f00be3fa2b6cf2ad231 | |
parent | a7cf4dde63cc2c5fa193a9f55825b0ae89443b02 (diff) | |
download | sssd-ce695425d92fb528ad7e5364fd375b2ddc47e352.tar.gz sssd-ce695425d92fb528ad7e5364fd375b2ddc47e352.tar.xz sssd-ce695425d92fb528ad7e5364fd375b2ddc47e352.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.
-rw-r--r-- | src/tools/sss_obfuscate | 8 |
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() |