# HG changeset patch # User Mahlon E. Smith # Date 1354044761 28800 # Node ID b8c6d4e8f828c0f7049d3887a7204e2bd4f4a792 # Parent 3e7c107f8b93514cd5f753249218d5a39f9823bf Add a flag to force a password prompt, so you can override credentials from your cached shelldap.rc. diff -r 3e7c107f8b93 -r b8c6d4e8f828 shelldap --- a/shelldap Wed Oct 10 22:44:40 2012 +0200 +++ b/shelldap Tue Nov 27 11:32:41 2012 -0800 @@ -1,7 +1,7 @@ #!/usr/bin/env perl # vim: set nosta noet ts=4 sw=4: # -# Copyright (c) 2006-2011, Mahlon E. Smith +# Copyright (c) 2006-2012, Mahlon E. Smith # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -120,7 +120,16 @@ =over 4 -=item B< tls> +=item B + +Force password prompting. Useful to temporarily override cached +credentials. + +=back + +=over 4 + +=item B Enables TLS over what would normally be an insecure connection. Requires server side support. @@ -463,7 +472,7 @@ You may try connecting insecurely, or install the module and try again.\n} if $@; } - if ( $conf->{'binddn'} && ! $conf->{'bindpass'} ) { + if ( ($conf->{'binddn'} && ! $conf->{'bindpass'}) || $conf->{'promptpass'} ) { print "Bind password: "; Term::ReadKey::ReadMode 2; chomp($conf->{'bindpass'} = ); @@ -1732,7 +1741,7 @@ use warnings; $0 = 'shelldap'; -my $VERSION = '0.5'; +my $VERSION = '0.6'; use Getopt::Long; use YAML::Syck; @@ -1750,6 +1759,7 @@ 'binddn|D=s', 'basedn|b=s', 'cacheage=i', + 'promptpass|W', 'timeout=i', 'tls_cacert=s', 'tls_cert=s',