You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2008/04/21 17:39:56 UTC
Re: svn commit: r30731 - in branches/dont-save-plaintext-passwords-by-default: . subversion/include subversion/libsvn_subr
On Mon, Apr 21, 2008 at 6:17 AM, <st...@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@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r30731 - in
branches/dont-save-plaintext-passwords-by-default: .
subversion/include subversion/libsvn_subr
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Apr 21, 2008 at 10:39:56AM -0700, David Glasser wrote:
> On Mon, Apr 21, 2008 at 6:17 AM, <st...@tigris.org> wrote:
> > * 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.
Yes, I'd like to leave it public precisely for the reason you stated.
Otherwise other clients would not be able to use it in their plaintext
prompt callbacks, and that would be a tad unfair, given that our CLI
client can use it.
OK?
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: svn commit: r30731 - in branches/dont-save-plaintext-passwords-by-default:
. subversion/include subversion/libsvn_subr
Posted by Daniel Shahaf <d....@daniel.shahaf.co.il>.
Eric Gillespie wrote on Mon, 21 Apr 2008 at 13:16 -0700:
> "David Glasser" <gl...@davidglasser.net> writes:
>
> > 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?
>
> Are you sure? It all comes out of Documents and
> Settings\epg\Subversion or something like that, for me.
Yes, see libsvn_subr/config.c:read_all().
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r30731 - in
branches/dont-save-plaintext-passwords-by-default: .
subversion/include subversion/libsvn_subr
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Apr 21, 2008 at 04:34:49PM -0400, C. Michael Pilato wrote:
> Eric Gillespie wrote:
>> "David Glasser" <gl...@davidglasser.net> writes:
>>
>>> 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?
>>
>> Are you sure? It all comes out of Documents and
>> Settings\epg\Subversion or something like that, for me.
>
> It can, yes, but you can also use the Windows Registry. We document this
> in the book, too:
> http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.windows-registry
>
The prompt does not take this into account.
What should it do though? Does using the registry imply that
no config file is present? It doesn't seem to, reading the book.
svn_config_ensure() is called either way, right?
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: svn commit: r30731 - in branches/dont-save-plaintext-passwords-by-default:
. subversion/include subversion/libsvn_subr
Posted by "C. Michael Pilato" <cm...@collab.net>.
Eric Gillespie wrote:
> "David Glasser" <gl...@davidglasser.net> writes:
>
>> 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?
>
> Are you sure? It all comes out of Documents and
> Settings\epg\Subversion or something like that, for me.
It can, yes, but you can also use the Windows Registry. We document this in
the book, too:
http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.windows-registry
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn commit: r30731 - in branches/dont-save-plaintext-passwords-by-default: . subversion/include subversion/libsvn_subr
Posted by Eric Gillespie <ep...@pretzelnet.org>.
"David Glasser" <gl...@davidglasser.net> writes:
> 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?
Are you sure? It all comes out of Documents and
Settings\epg\Subversion or something like that, for me.
--
Eric Gillespie <*> epg@pretzelnet.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org