Re: [PATCH v5 2/3] git-core: Support retrieving passwords with GIT_ASKPASS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frank Li <lznuaa@xxxxxxxxx> writes:

> imap-send and authority http connect reads passwords from an interactive
> terminal. This behavious cause GUIs to hang waiting for git complete.

"authority http"?  Perhaps...

    git tries to read a password from the terminal in imap-send and
    talking to http server that requires authentication.

    When a GUI is driving git, however, the end user is not paying
    attention to the terminal (there may not even be a terminal).  GUI
    would appear to hang forever.

> Fix this problem by allowing a password-retrieving command
> to be specified in GIT_ASKPASS
>
> Signed-off-by: Frank Li <lznuaa@xxxxxxxxx>
> ---

Here after three-dash lines, could you describe the changes (what changed
and why) since the last round, when sending a revised version?  Saying
"This round addressed such and such issues raised and I think it is ready
for inclusion" (when you think it is ready) would also help.

> +	if (start_command(&pass))
> +		exit(1);
> +
> +	if (strbuf_read(&buffer, pass.out, 20) < 0)
> +		die("fail get password from %s\n", askpass);

"failed to get..."

> +	close(pass.out);
> +
> +	if (finish_command(&pass))
> +		exit(1);
> +
> +	strbuf_setlen(&buffer, strcspn(buffer.buf, "\r\n"));
> +
> +	if (pd) {
> +		free(pd);
> +		pd = NULL;
> +	}
> +	/*it maybe memory leak because getpass return a static buffer*/

Hmph, why not do this at the beginning?  Is the "maybe leak" comment still
valid?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]