sss_obfuscate revision e8058322725ba050014777ee2484f7e833ab1e3a
human-unreadable format and places it into \
appropriate domain section of the SSSD config \
file. The password can be passed in by stdin, \
specified on the command-line or entered \
interactively")
print >> sys.stderr, "Cannot parse options"
return 1
if not options.domain:
print >> sys.stderr, "No domain specified"
return 1
if not options.stdin:
try:
#Work around bug in Python 2.6
print('Passwords do not match. Try again')
#Work around bug in Python 2.6
print >> sys.stderr, '\nUnexpected end-of-file. Password change aborted'
return 1
return 1
else:
try:
return 1
# Obfuscate the password
# Save the obfuscated password into the domain
try:
print "Cannot read internal configuration files."
return 1
try:
print "Permissions error reading config file"
return 1
try:
print "No such domain %s" % options.domain
return 1
try:
print "The domain %s does not seem to support the required options" % \
return 1
try:
# File could not be written
print >> sys.stderr, "Could not write to config file. Check that " \
"you have the appropriate permissions to edit " \
"this file."
return 1
return 0
if __name__ == "__main__":