Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Zbigniew Jędrzejewski-Szmek
polkit
Commits
cd4b5f92
Commit
cd4b5f92
authored
Nov 24, 2007
by
David Zeuthen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write newline since kit_string_entry_create doesn't do that any more
parent
f479aece
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/polkit-grant/polkit-authorization-db-write.c
src/polkit-grant/polkit-authorization-db-write.c
+9
-0
No files found.
src/polkit-grant/polkit-authorization-db-write.c
View file @
cd4b5f92
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment