"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "utils/chsh.py" between
nss-pam-ldapd-0.9.11.tar.gz and nss-pam-ldapd-0.9.12.tar.gz

About: nss-pam-ldapd is a Name Service Switch (NSS) module and Pluggable Authentication Module (PAM) that allows your LDAP server to provide user account, group, host name, alias, netgroup, and basically any other information that you would normally get from /etc flat files or NIS. It also allows you to do authentication to an LDAP server.

chsh.py  (nss-pam-ldapd-0.9.11):chsh.py  (nss-pam-ldapd-0.9.12)
skipping to change at line 44 skipping to change at line 44
epilog='Report bugs to <%s>.' % constants.PACKAGE_BUGREPORT) epilog='Report bugs to <%s>.' % constants.PACKAGE_BUGREPORT)
parser.add_argument('-V', '--version', action=VersionAction) parser.add_argument('-V', '--version', action=VersionAction)
parser.add_argument('-s', '--shell', help='login shell for the user account') parser.add_argument('-s', '--shell', help='login shell for the user account')
parser.add_argument('-l', '--list-shells', action=ListShellsAction) parser.add_argument('-l', '--list-shells', action=ListShellsAction)
parser.add_argument('username', metavar='USER', nargs='?', parser.add_argument('username', metavar='USER', nargs='?',
help="the user who's shell to change") help="the user who's shell to change")
def ask_shell(oldshell): def ask_shell(oldshell):
"""Ask the user to provide a shell.""" """Ask the user to provide a shell."""
# Provide Python 2 compatibility # Provide Python 2 compatibility
prompt = ' Login Shell [%s]: ' % oldshell
try: try:
input = raw_input shell = raw_input(prompt)
except NameError: except NameError:
pass shell = input(prompt)
shell = input(' Login Shell [%s]: ' % oldshell)
return shell or oldshell return shell or oldshell
def main(): def main():
# parse arguments # parse arguments
args = parser.parse_args() args = parser.parse_args()
# check username part # check username part
user = users.User(args.username) user = users.User(args.username)
user.check() user.check()
# check the command line shell if one was provided (to fail early) # check the command line shell if one was provided (to fail early)
shell = args.shell shell = args.shell
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)