Aaron Richton wrote:
Omit trailing newline from generated password, so it may be directed
to a file and used by commandline tools
What about a "-n" (much like "sophisticated" echo implementations) to
avoid breaking existing usage?
One could also consider the GNU ls dircolor model (--color=tty, the
default): prettyprint to tty, straightforward output if redirected.
I might be biased by my extremely infrequent use of slappasswd, but I
could also see an argument towards holding this to RE24 if it's not "-n"
entirely optional style. I'm sure somebody out there is going to
need to change a script that already chomps the newline, it'd be nice to
not stick them with that on a bugfix release.
Since the existing versions of slappasswd didn't have an option to
generate a random password, there's no backward compatibility issue
here. There's no "existing usage" to break. As for script writers moving
forward - shell command substitution doesn't care either way. It's
trivial to add a "-n" option, of course, but I don't see it being
necessary or even useful.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/