git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Gaffney <mr.gaffo@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH][v2] http authentication via prompts (with correct line lengths)
Date: Mon, 09 Mar 2009 23:46:50 -0500	[thread overview]
Message-ID: <49B5F0BA.3070806@gmail.com> (raw)
In-Reply-To: <7v1vt6dxg9.fsf@gitster.siamese.dyndns.org>

Junio,
	Just spent about 30 minutes replying to your points until the last one
made most moot. I agree that putting the info into the url will fix the bug, 
which I have never seen (see #3 below), and make the howto easier to read. So a 
few things I wanted to discuss or ask for help on:

1) Note that I'm not a C guy so:

Junio wrote:
>> +static const char *curl_http_username = NULL;
>> +static const char *curl_http_password = NULL;
>> +
> Please do not introduce new initializations of static variables to 0 or
> NULL.  As a clean-up, before your patch, you can send in a patch to fix
> existing such initializations.

I'm not sure what you mean here. Should I just declare them as:
static const char *curl_http_password; ?

Also do you mean that during after the patch phase they get changed to:
static const char *curl_http_password = NULL; ?

Or do you mean that I can send in a patch to fix other static variables
(not mine) which are being initialized to NULL?

2) Being that I'm not a big C guy, I'm not sure the best way to go about 
parsing the username out of the URL to pull it into a variable to pass
to CURLOPT_USERPASS. Any advice from the community would be greatly
appreciated.

3) From my experience with curl, many of the options do
not work the same across versions or platforms. For example, the new
CURLOPT_USERNAME/PASSWORD options worked fine in 7.19.4 on cygwin but not
on FC9, which is why I used the older USERPWD. Also, my curl never prompted
me for the password when I supplied a username in the URL which is what 
prompted me to do this patch in the first place. As such, I think it is
better to pull the username & password prompting logic into git make this 
stable and fix the bug. 

4) I'm not really impressed that file permissions actually make the .netrc
file a secure option. However, it's already in there and would break
backwards compatibility to take it out. I also realize that there is a need
for automated builds to be able to pull the source. So I would like to add a nice 
warning section to the http docs explaining the repercussions of using it.

Thanks for the help,
	Mike

  parent reply	other threads:[~2009-03-10  4:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10  0:08 [PATCH][v2] http authentication via prompts (with correct line lengths) Mike Gaffney
2009-03-10  0:37 ` Junio C Hamano
2009-03-10  0:45   ` Johannes Schindelin
2009-03-10  3:25     ` Mike Gaffney
2009-03-10 10:43       ` Johannes Schindelin
2009-03-10 15:33         ` Mike Gaffney
2009-03-10  4:46   ` Mike Gaffney [this message]
2009-03-10  6:34     ` Junio C Hamano
2009-03-10  8:08       ` Daniel Stenberg
2009-03-10  8:35         ` Junio C Hamano
2009-03-12  8:53       ` Mike Ralphson
2009-03-12  8:59         ` Daniel Stenberg
2009-03-12  9:12           ` Mike Ralphson
2009-03-12  9:24             ` Daniel Stenberg
2009-03-13  5:53         ` Junio C Hamano
2009-03-13  7:58           ` Daniel Stenberg
2009-03-13 10:53           ` Mike Ralphson
2009-03-14  5:55             ` Junio C Hamano
2009-03-13 12:47           ` Mike Gaffney
2009-03-14  6:43             ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2009-03-17  5:15 Amos King
2009-03-17  6:27 ` Junio C Hamano
2009-03-17  6:47   ` Junio C Hamano
2009-03-17 16:24   ` Daniel Barkalow
2009-03-18 22:41     ` Amos King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B5F0BA.3070806@gmail.com \
    --to=mr.gaffo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).