From d6f07d7b0e2e0bfef721ce51fbf42754c29568b2 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 9 May 2009 12:17:59 -0300 Subject: Make temporary ssh-askpass remove itself; chmod 0700 the remote.conf file --- hardinfo2/shell.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hardinfo2/shell.c') diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index 94cb843f..5e7dfdc8 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -590,10 +590,14 @@ void shell_save_hosts_file(void) gchar *path, *remote_conf; gsize length; + DEBUG("saving hosts file"); + path = g_build_filename(g_get_home_dir(), ".hardinfo", "remote.conf", NULL); remote_conf = g_key_file_to_data(shell->hosts, &length, NULL); g_file_set_contents(path, remote_conf, length, NULL); + + g_chmod(path, 0700); g_free(remote_conf); g_free(path); -- cgit v1.2.3