This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Add login to remote protocol
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Stan Shebs <stan at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 10 Apr 2010 10:09:59 +0300
- Subject: Re: [RFC] Add login to remote protocol
- References: <4BBFA9E1.1020609@codesourcery.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 09 Apr 2010 15:27:45 -0700
> From: Stan Shebs <stan@codesourcery.com>
>
> + @item set remote username @var{username}
> + @itemx show remote username
> + Set the username to be sent to targets that require a login. The
> + username is an arbitary string.
> +
> + @item set remote password @var{password}
> + @itemx show remote password
> + Set the password to be sent to targets that require a login. The
> + password is an arbitary string. At present it is stored as cleartext.
> +
Two comments:
. This needs @cindex entries for "remote username" and "remote
password".
. Wouldn't it be better to have just one command for both?
A related question: once a non-empty password was specified, how to
reset it back to empty?
> + If the target requires a login (@samp{MustAuth} feature),
> + then if this packet is not supplied soon after connection, then the
> + target may choose to return errors to all subsequent packets and/or
> + disconnect.
Too many "then"s. I would simply remove the second one.
> + @value{GDBN} must send an authorization packet @samp{qAuth} and the
> + username/password pair must be accepted, otherwise the target will
> + return an error and refuse to continue with the session. ^^^^
Probably "may" instead of "will" is more appropriate, since we don't
actually know what the target does without the credentials.
> + remote_username = xstrdup ("");
> + add_setshow_string_noescape_cmd ("username", class_files,
> + &remote_username, _("\
> + Set the remote username"), _("\
> + Show the remote username"), NULL, NULL, NULL,
> + &remote_set_cmdlist, &remote_show_cmdlist);
> +
> + remote_password = xstrdup ("");
> + add_setshow_string_noescape_cmd ("password", class_files,
> + &remote_password, _("\
> + Set the remote password"), _("\
> + Show the remote password"), NULL, NULL, NULL,
> + &remote_set_cmdlist, &remote_show_cmdlist);
> +
Please consider adding some explanatory text to the doc strings.
Also, we will need a NEWS entry for this new feature.