Commit cd4b5f92 authored by David Zeuthen's avatar David Zeuthen

write newline since kit_string_entry_create doesn't do that any more

parent f479aece
......@@ -91,6 +91,7 @@ _polkit_authorization_db_auth_file_add (const char *root, polkit_bool_t transien
polkit_bool_t ret;
struct stat statbuf;
struct passwd *pw;
char *newline = "\n";
ret = FALSE;
path = NULL;
......@@ -170,6 +171,14 @@ _polkit_authorization_db_auth_file_add (const char *root, polkit_bool_t transien
}
goto out;
}
if (!_write_to_fd (fd, newline, 1)) {
g_warning ("Cannot write to temporary authorizations file %s: %m", path_tmp);
close (fd);
if (unlink (path_tmp) != 0) {
g_warning ("Cannot unlink %s: %m", path_tmp);
}
goto out;
}
close (fd);
if (path != NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment