| https://bugs.gentoo.org/show_bug.cgi?id=309457 |
| https://bugs.freedesktop.org/show_bug.cgi?id=27081 |
| |
| --- src/programs/pkexec.c |
| +++ src/programs/pkexec.c |
| @@ -375,6 +375,7 @@ |
| gchar *path; |
| struct passwd pwstruct; |
| gchar pwbuf[8192]; |
| + gchar cwdbuf[PATH_MAX]; |
| gchar *s; |
| const gchar *environment_variables_to_save[] = { |
| "SHELL", |
| @@ -438,7 +439,7 @@ |
| goto out; |
| } |
| |
| - original_cwd = g_strdup (get_current_dir_name ()); |
| + original_cwd = g_strdup (getcwd(cwdbuf,PATH_MAX)); |
| if (original_cwd == NULL) |
| { |
| g_printerr ("Error getting cwd.\n"); |