mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Ask for remote password if required.
git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@210 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
parent
46ef82019a
commit
f7e3964acd
2 changed files with 17 additions and 1 deletions
|
|
@ -480,6 +480,9 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar
|
|||
args_info->pass_arg = ppass;
|
||||
args_info->user_given = 1;
|
||||
args_info->pass_given = 1;
|
||||
} else if ( r == 1 ) {
|
||||
args_info->user_arg = args_info->proxyauth_arg;
|
||||
args_info->user_given = 1;
|
||||
} else {
|
||||
message( "parse_cmdline: couln't find your proxy auth user/pass\n" );
|
||||
missing_required_options++;
|
||||
|
|
@ -500,6 +503,9 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar
|
|||
args_info->rempass_arg = rpass;
|
||||
args_info->remuser_given = 1;
|
||||
args_info->rempass_given = 1;
|
||||
} else if ( r == 1 ) {
|
||||
args_info->remuser_arg = args_info->remproxyauth_arg;
|
||||
args_info->remuser_given = 1;
|
||||
} else {
|
||||
message( "parse_cmdline: couln't find your proxy auth user/pass\n" );
|
||||
missing_required_options++;
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ int main( int argc, char *argv[] ) {
|
|||
/* If the usename is given, but password is not, prompt for it */
|
||||
if( args_info.user_given && !args_info.pass_given ) {
|
||||
char *cp;
|
||||
cp = getpass_x ("Enter proxy password:");
|
||||
cp = getpass_x ("Enter local proxy password:");
|
||||
if (cp != NULL && strlen (cp) > 0) {
|
||||
args_info.pass_arg = strdup (cp);
|
||||
args_info.pass_given = 1;
|
||||
|
|
@ -341,6 +341,16 @@ int main( int argc, char *argv[] ) {
|
|||
}
|
||||
}
|
||||
|
||||
if( args_info.remuser_given && !args_info.rempass_given ) {
|
||||
char *cp;
|
||||
cp = getpass_x ("Enter remote proxy password:");
|
||||
if (cp != NULL && strlen (cp) > 0) {
|
||||
args_info.rempass_arg = strdup (cp);
|
||||
args_info.rempass_given = 1;
|
||||
memset (cp, 0, strlen(cp));
|
||||
}
|
||||
}
|
||||
|
||||
if( args_info.user_given && args_info.pass_given ) {
|
||||
if (args_info.ntlm_flag) {
|
||||
build_type1();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue