On Mon, Apr 21, 2008 at 6:17 AM, <stsp_at_tigris.org> wrote:
> Author: stsp
> Date: Mon Apr 21 06:17:56 2008
> New Revision: 30731
>
> Log:
> On the dont-save-plaintext-passwords-by-default branch,
> tell the user exactly which file to edit during the prompt.
Hmm. I don't know the details of how this works, but I'm pretty sure
that we support getting config out of things other than files:
specifically, on Windows, we can get it from the registry instead of
the filesystem. Does this prompt take that into account?
Also:
> * subversion/include/svn_config.h
> (svn_config_get_user_config_path): Declare and document.
Does this need to be public (eg, because other implementors of the
prompt need to use it or something)? You don't use it outside of
libsvn_subr.
> Modified: branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/prompt.c
> URL: http://svn.collab.net/viewvc/svn/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/prompt.c?pathrev=30731&r1=30730&r2=30731
> ==============================================================================
> --- branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/prompt.c Mon Apr 21 04:54:03 2008 (r30730)
> +++ branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/prompt.c Mon Apr 21 06:17:56 2008 (r30731)
> @@ -385,14 +385,19 @@ svn_cmdline_auth_plaintext_prompt(svn_bo
> const char *answer = NULL;
> svn_boolean_t answered = FALSE;
> const char *prompt_string = _("Store password unencrypted (yes/no)? ");
> - svn_cmdline_prompt_baton_t *pb = (svn_cmdline_prompt_baton_t *)baton;
> + svn_cmdline_prompt_baton2_t *pb = baton;
> + const char *config_path;
> +
> + SVN_ERR(svn_config_get_user_config_path(&config_path, pb->config_dir,
> + SVN_CONFIG_CATEGORY_CONFIG, pool));
>
> SVN_ERR(svn_cmdline_fprintf(stderr, pool,
> _("-----------------------------------------------------------------------\n"
> "ATTENTION! Your password is going to be stored to disk unencrypted!\n"
> "-----------------------------------------------------------------------\n"
> - "You can get rid of this warning by editing your configuration file\n"
> - "and setting 'store-plaintext-passwords' to either 'yes' or 'no'.\n")));
> + "You can get rid of this warning by editing %s\n"
The config path is likely to be long, so put it on its own line (in
single quotes, perhaps).
> + "and setting 'store-plaintext-passwords' to either 'yes' or 'no'.\n"),
> + config_path));
--dave
ps: Great work on this branch so far! Code review can look like
sniping but I'm excited about how this feature is coming along.
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-22 08:23:31 CEST