diff options
| author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-03-30 00:17:17 +0000 |
|---|---|---|
| committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-03-30 00:17:17 +0000 |
| commit | ada2201110bf87ce638675e4f70551576eb72369 (patch) | |
| tree | 08d0ea5c4182154a6dee94b4f370c9b22bad966d /sysutils/policykit/files/patch-src_polkit-grant_polkit-grant.c | |
| parent | Really fix INDEX. (diff) | |
* Fix a problem where waitpid() may return EINTR which causes the various
polkit helpers to report a failure. This fix allows dynamic polkit
policies to actually work (e.g. mounting fixed drives with proper
authorization).
* Workaround a bug in our version of getline(3), and check for EOF when
getline does not return -1.
Diffstat (limited to 'sysutils/policykit/files/patch-src_polkit-grant_polkit-grant.c')
| -rw-r--r-- | sysutils/policykit/files/patch-src_polkit-grant_polkit-grant.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysutils/policykit/files/patch-src_polkit-grant_polkit-grant.c b/sysutils/policykit/files/patch-src_polkit-grant_polkit-grant.c new file mode 100644 index 000000000000..7c22acea573a --- /dev/null +++ b/sysutils/policykit/files/patch-src_polkit-grant_polkit-grant.c @@ -0,0 +1,11 @@ +--- src/polkit-grant/polkit-grant.c.orig 2009-03-29 20:12:16.000000000 -0400 ++++ src/polkit-grant/polkit-grant.c 2009-03-29 20:13:15.000000000 -0400 +@@ -303,7 +303,7 @@ polkit_grant_io_func (PolKitGrant *polki + g_return_if_fail (polkit_grant != NULL); + g_return_if_fail (polkit_grant->helper_is_running); + +- while (kit_getline (&line, &line_len, polkit_grant->child_stdout_f) != -1) { ++ while (kit_getline (&line, &line_len, polkit_grant->child_stdout_f) != -1 && !feof (polkit_grant->child_stdout_f)) { + if (strlen (line) > 0 && + line[strlen (line) - 1] == '\n') + line[strlen (line) - 1] = '\0'; |
