mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-07-20 17:59:03 +00:00
Set correct (rem)user|pass_given fields when using -F flag
git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@215 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
parent
3c205207fc
commit
cd4660487a
1 changed files with 8 additions and 2 deletions
10
cmdline.c
10
cmdline.c
|
|
@ -303,9 +303,15 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar
|
|||
clear_args ();
|
||||
exit(1);
|
||||
}
|
||||
args_info->user_given = 1;
|
||||
args_info->pass_given = 1;
|
||||
char *result = getCredentialsFromFile(optarg, &(args_info->user_arg), &(args_info->pass_arg), &(args_info->remuser_arg), &(args_info->rempass_arg) );
|
||||
if ( args_info->user_arg != NULL )
|
||||
args_info->user_given = 1;
|
||||
if ( args_info->pass_arg != NULL )
|
||||
args_info->pass_given = 1;
|
||||
if ( args_info->remuser_arg != NULL )
|
||||
args_info->remuser_given = 1;
|
||||
if ( args_info->rempass_arg != NULL )
|
||||
args_info->rempass_given = 1;
|
||||
|
||||
if( result != NULL ) {
|
||||
fprintf( stderr, "%s: Bad password file for `--passfile' (`-F')\n%s\n", PACKAGE, result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue