mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
parent
2a93daec04
commit
4707927031
1 changed files with 5 additions and 4 deletions
|
@ -362,8 +362,8 @@ static void parse_ssh_config_file ( SSHModePrivateData *pd, const char *filename
|
||||||
if ( !token || *token == '#' ) {
|
if ( !token || *token == '#' ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
char *low_token = g_ascii_strdown(token, -1);
|
||||||
if ( g_strcmp0 ( token, "Include" ) == 0 ) {
|
if ( g_strcmp0 ( low_token, "include" ) == 0 ) {
|
||||||
token = strtok_r ( NULL, SSH_TOKEN_DELIM, &strtok_pointer );
|
token = strtok_r ( NULL, SSH_TOKEN_DELIM, &strtok_pointer );
|
||||||
g_debug ( "Found Include: %s", token );
|
g_debug ( "Found Include: %s", token );
|
||||||
gchar *path = rofi_expand_path ( token );
|
gchar *path = rofi_expand_path ( token );
|
||||||
|
@ -388,13 +388,13 @@ static void parse_ssh_config_file ( SSHModePrivateData *pd, const char *filename
|
||||||
g_free ( full_path );
|
g_free ( full_path );
|
||||||
g_free ( path );
|
g_free ( path );
|
||||||
}
|
}
|
||||||
else if ( g_strcmp0 ( token, "UserKnownHostsFile" ) == 0 ) {
|
else if ( g_strcmp0 ( low_token, "userknownhostsfile" ) == 0 ) {
|
||||||
while ( ( token = strtok_r ( NULL, SSH_TOKEN_DELIM, &strtok_pointer ) ) ) {
|
while ( ( token = strtok_r ( NULL, SSH_TOKEN_DELIM, &strtok_pointer ) ) ) {
|
||||||
g_debug("Found extra UserKnownHostsFile: %s", token);
|
g_debug("Found extra UserKnownHostsFile: %s", token);
|
||||||
add_known_hosts_file ( pd, token );
|
add_known_hosts_file ( pd, token );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( g_strcmp0 ( token, "Host" ) == 0 ) {
|
else if ( g_strcmp0 ( low_token, "host" ) == 0 ) {
|
||||||
// Now we know that this is a "Host" line.
|
// Now we know that this is a "Host" line.
|
||||||
// The "Host" keyword is followed by one more host names separated
|
// The "Host" keyword is followed by one more host names separated
|
||||||
// by whitespace; while host names may be quoted with double quotes
|
// by whitespace; while host names may be quoted with double quotes
|
||||||
|
@ -434,6 +434,7 @@ static void parse_ssh_config_file ( SSHModePrivateData *pd, const char *filename
|
||||||
( *length )++;
|
( *length )++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
g_free ( low_token );
|
||||||
}
|
}
|
||||||
if ( buffer != NULL ) {
|
if ( buffer != NULL ) {
|
||||||
free ( buffer );
|
free ( buffer );
|
||||||
|
|
Loading…
Reference in a new issue