[PATCH] ssh: ensure ~/.ssh exists

Tuncer Ayaz tuncer.ayaz@REDACTED
Fri Sep 3 13:18:53 CEST 2010


On Fri, Sep 3, 2010 at 12:52 PM, Tuncer Ayaz wrote:
> @@ -113,8 +118,10 @@ do_lookup_host_key(Host, Alg, Opts) ->
>
>  add_host_key(Host, Key, Opts) ->
>     Host1 = add_ip(replace_localhost(Host)),
> -    case file:open(file_name(user, "known_hosts", Opts),[write,append]) of
> +    KnownHosts = file_name(user, "known_hosts", Opts),
> +    case file:open(KnownHosts, [write,append]) of
>        {ok, Fd} ->
> +           ok = chmod(KnownHosts, ?PERM_644),

I'm not sure the above is really needed. Comments welcome.


More information about the erlang-patches mailing list