diff --git a/.hgsigs b/.hgsigs new file mode 100644 index 0000000..507d88e --- /dev/null +++ b/.hgsigs @@ -0,0 +1,4 @@ +5de7014b0e608e3e95ce8d48125b18d8d8ef3b2c 0 iD8DBQBRSPZ01bsjBDapbeMRAhQLAKCNbDa6gxBJTz2AsyV6A8trw+BrrQCcDUrEWbabfbuYBX3U3cLltIZGsys= +b220dc77493703900627d6cb556728217fe40fe1 0 iD8DBQBT6Qk91bsjBDapbeMRAmXLAKCgAyR+SeXy1q91mAnyv3P0OM6rBwCfaVuVRsGEFd2e7uJiNpUvyIFqm2g= +ceb8bd75e05b98d61db8e37c2778995ecb377dab 0 iD8DBQBUgNz51bsjBDapbeMRAm+UAJ4xM+eF77Lter5brh156c13yObYJACgl6tCkqgGpwCvtC9vv4VR5elzfYo= +ac3c6d1057d5fd99bee1081741ed5247c3a29e80 0 iD8DBQBU91sZ1bsjBDapbeMRAoPWAJ9qrdy8Kn7RuOo2HftFTG2SBXZDgACfSEWBxLYJWGaNY2DI22JC0IF9h2c= diff --git a/.hgtags b/.hgtags new file mode 100644 index 0000000..d3ab45a --- /dev/null +++ b/.hgtags @@ -0,0 +1,6 @@ +27bbe75233a3da1482fededd7f67215bc716b2d5 v1.0.0 +e1728adb2561a87a3ab10e57ae4b3140abf4b5cf v1.1.0 +1a480ba231b6ef7714a08151434b7773a1851936 v1.2.0 +b3b840a4b56c534501ee930a8ca0b2e08ecb43bb v1.3.0 +e8af5aa8bd1541bd7d06f5f08c27d0c16b176df4 v1.4.0 +d6a75d14db1261943924f265119c1812736aabd1 v1.5.0 diff --git a/CHANGELOG b/CHANGELOG index 567e200..2ff1bab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,4 @@ -2024-12-29 v1.5.2 - - * Revert an LCS deletion edge case, allowing final attribute - in a list of changes to be properly removed. - - 2019-10-13 v1.5.1 * Repair SASL authentications, add a 'sasluser' option @@ -72,7 +66,7 @@ 2014-06-21 v.1.1.0 * Add CONTRIBUTORS file. - + * Add simple (optional) SASL support. * Fix the DN regexp to include dashes. @@ -91,7 +85,7 @@ 2013-04-18 v1.0.1 - * Fix for edge case Diff::LCS traversals. + * Fix for edge case Diff::LCS traversals. * Ensure re-edit state is cleared in between attempts. diff --git a/LICENSE b/LICENSE index 8bb2d12..42d1a4d 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2006-2024, Mahlon E. Smith +Copyright (c) 2006-2019, 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: diff --git a/README.md b/README.md index 118ae3a..c26117a 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ Witness! ``` -% shelldap +% shelldap ~ > [ tab ] -~ > -cat clear cp delete env grep id ls move passwd read search touch whoami -cd copy create edit exit help list mkdir mv pwd rm setenv vi +~ > +cat clear cp delete env grep id ls move passwd read search touch whoami +cd copy create edit exit help list mkdir mv pwd rm setenv vi ~ > cd ou=People ou=People,~ > cat uid=ma[ tab ] ou=People,~ > cat uid=mahlon @@ -44,25 +44,19 @@ uid: mahlon uidNumber: 20933 userPassword: * -ou=People,~ > +ou=People,~ > ``` Downloads --------- -You can download the latest script -[here](https://code.martini.nu/fossil/shelldap/tarball/tip/shelldap-tip.tar.gz). +You can download the latest script [here](http://code.martini.nu/shelldap/archive/tip.zip). -It is also available via the -[FreeBSD ports](https://ports.freebsd.org/cgi/ports.cgi?query=shelldap&stype=all&sektion=all) system, -OS X via [macports](https://trac.macports.org/browser/trunk/dports/net/shelldap/Portfile), -Debian/Ubuntu via [apt](https://packages.debian.org/shelldap), -NetBSD's [pkgsrc](http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/shelldap/index.html), -OpenBSD [ports](https://openports.pl/path/sysutils/shelldap), -openSUSE's [build service](https://software.opensuse.org/package/shelldap?search_term=shelldap), -Arch's User Repository [AUR](https://aur.archlinux.org/packages/shelldap), -and as a Fedora [RPM](https://src.fedoraproject.org/rpms/shelldap). +It is also available via the +[FreeBSD ports](http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/shelldap/) system, OS X via +[macports](https://trac.macports.org/browser/trunk/dports/net/shelldap/Portfile), Debian/Ubuntu via [apt](https://packages.debian.org/shelldap), +NetBSD's [pkgsrc](ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/shelldap/README.html), OpenBSD [ports](http://openports.se/sysutils/shelldap), openSUSE's [build service](http://software.opensuse.org/search?q=shelldap&baseproject=openSUSE%3AFactory&lang=en), and as a Fedora [RPM](https://src.fedoraproject.org/rpms/shelldap). Many thanks to the maintainers of these packages. @@ -76,7 +70,7 @@ Shelldap requires the following perl modules to function properly: * YAML::Syck * Term::Shell -* Digest::MD5 +* Digest::MD5 * Net::LDAP * Algorithm::Diff @@ -91,9 +85,9 @@ Development ----------- -You can also check out the source via [Fossil](http://fossil-scm.org/) from the following uri: +You can also check out the source via [Mercurial](http://mercurial.selenic.com/wiki/) from the following uri: - % fossil clone https://code.martini.nu/fossil/shelldap + % hg clone http://code.martini.nu/shelldap/ or via its [GitHub](https://github.com/) mirror at: @@ -104,4 +98,3 @@ Documentation ------------- Once installed, Shelldap is fully documented via perldoc, and has a built-in `help` command as well. - diff --git a/shelldap b/shelldap index 898ccd9..92afdfc 100755 --- a/shelldap +++ b/shelldap @@ -1485,7 +1485,6 @@ sub diff { # if ( $cur_valcount == 1 ) { $e->replace( $attr => $val ); - $seen_attr{ $attr }++; } else { @@ -1510,6 +1509,10 @@ sub diff { # foreach ( $diff->Items(1) ) { my ( $attr, $val ) = $parse->( $_ ) or next; + my $cur_vals = $e->get_value( $attr, asref => 1 ) || []; + my $cur_valcount = scalar @$cur_vals; + + next if $cur_valcount == 1; next if $seen_attr{ $attr }; $self->debug("DELETE: $_"); $e->delete( $attr => [ $val ] ); @@ -2703,7 +2706,7 @@ use warnings; use Fatal qw/open/; $0 = 'shelldap'; -my $VERSION = '1.5.2'; +my $VERSION = '1.5.1'; use Getopt::Long qw(:config no_ignore_case); use YAML::Syck qw//;