diff options
author | Ray Strode <rstrode@redhat.com> | 2013-05-20 14:44:20 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2013-05-20 19:49:12 -0400 |
commit | 64e896b741c40f3b9213427eece0374eafa7f699 (patch) | |
tree | d77cf415952bdc1e9db23d0ed12e8442367ccf63 /src/daemon.c | |
parent | 87c06b7a0104bd9bb8a3eda528a1b1af8dfcd2f4 (diff) | |
download | accountsservice-64e896b741c40f3b9213427eece0374eafa7f699.tar.gz |
daemon: make cache_user do a full save
The cache_user function currently just does:
comment = g_strdup_printf ("# Cached file for %s\n\n", user_name);
g_file_set_contents (filename, comment, -1, &error);
This commit changes it to write out a full key file.
https://bugs.freedesktop.org/show_bug.cgi?id=64769
Diffstat (limited to 'src/daemon.c')
-rw-r--r-- | src/daemon.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/daemon.c b/src/daemon.c index 67048d9..264434e 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -1103,9 +1103,7 @@ static void cache_user (Daemon *daemon, User *user) { - GError *error = NULL; gchar *filename; - gchar *comment; const char *user_name; /* Always use the canonical user name looked up */ @@ -1113,15 +1111,7 @@ cache_user (Daemon *daemon, filename = g_build_filename (USERDIR, user_name, NULL); if (!g_file_test (filename, G_FILE_TEST_EXISTS)) { - comment = g_strdup_printf ("# Cached file for %s\n\n", user_name); - g_file_set_contents (filename, comment, -1, &error); - g_free (comment); - - if (error != NULL) { - g_warning ("Couldn't write user cache file: %s: %s", - filename, error->message); - g_error_free (error); - } + user_save (user); } g_free (filename); |