Introduce a new global option: --password-from-stdin
This new option makes Subversion's command line applications read a password from standard input. It can be used as an alternative to the --password option in order to provide passwords without leaking them to argv, which on Unix-like systems can be viewed by anyone with tools such as ps(1).
* subversion/svn/svn.c, subversion/svnbench/svnbench.c (svn_cl__longopt_t): Add opt_auth_password_from_stdin. (svn_cl__options): Add --password-from-stdin. (svn_cl__global_options): Add opt_auth_password_from_stdin. (sub_main): Handle the new option.
* subversion/svnmucc/svnmucc.c (help): Add --password-from-stdin option to help text. (sub_main): Handle the new option.
* subversion/svnrdump/svnrdump.c (svn_svnrdump__longopt_t): Add opt_auth_password_from_stdin. (svnrdump__options, opt_baton_t): Add --password-from-stdin and --dumpfile. (opt_baton_t, replay_revisions, dump_cmp, load_cmd, sub_main): Add support for the new options. Since svnrdump has historically been reading dump file data from stdin the --password-from-stdin option requires --dumpfile.
* tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c (svn_min__longopt_t, svn_min__options): Add opt_auth_password_from_stdin. (svn_min__options): Add --password-from-stdin. (sub_main): Support the new options.
* tools/client-side/svnconflict/svnconflict.c (svnconflict_cmd_baton_t, global_options): Add opt_auth_password_from_stdin. (svnconflict_options): Add --password-from-stdin. (sub_main): Support the new options.
Fix a potential bug and an API contract violation in the Win32 implementation of svn_io_file_write_full().
Even in the case when a specific workaround for issue #1789 is not required, the implementation of this function has been calling apr_file_write() that can do a short write and return APR_SUCCESS. If that happens, the guarantee of the "write full" function would not be fulfilled in the sense that the function would write less bytes than requested without an associated error, and that could cause issues further down the line.
On Windows, apr_file_write() is implemented as a call to WriteFile() that shouldn't result in short writes for file handles, but such short writes are still possible, for example, for pipes. That is where the previous implementation could be working improperly. (See the "Remarks" section in https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747).
* subversion/libsvn_subr/io.c (svn_io_file_write_full): Always attempt a full write in the Win32-specific code path. Join and tweak the comments on issue #1789, add the issue number and place the comment right before the code that implements a workaround.