diff options
author | Emilio Pozuelo Monfort <pochu27@gmail.com> | 2011-03-26 07:28:14 +0000 |
---|---|---|
committer | David Zeuthen <zeuthen@gmail.com> | 2013-01-09 14:06:14 -0500 |
commit | d6de13e12379826af8ca9355a32da48707b9831f (patch) | |
tree | 1da50ea475f4dd3c765479259d6420f65dfe9ccd /src | |
parent | 147fe14d4c1ce73c99e61c4e3bfbb32a788ecffd (diff) | |
download | polkit-d6de13e12379826af8ca9355a32da48707b9831f.tar.gz |
Fix build on GNU Hurd
https://bugs.freedesktop.org/show_bug.cgi?id=35685
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/programs/pkexec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c index da9784a..f42a3bb 100644 --- a/src/programs/pkexec.c +++ b/src/programs/pkexec.c @@ -53,7 +53,7 @@ #include <polkitagent/polkitagent.h> static gchar *original_user_name = NULL; -static gchar original_cwd[PATH_MAX]; +static gchar *original_cwd; static gchar *command_line = NULL; static struct passwd *pw; @@ -476,7 +476,7 @@ main (int argc, char *argv[]) goto out; } - if (getcwd (original_cwd, sizeof (original_cwd)) == NULL) + if ((original_cwd = g_get_current_dir ()) == NULL) { g_printerr ("Error getting cwd: %s\n", g_strerror (errno)); @@ -970,6 +970,7 @@ main (int argc, char *argv[]) g_ptr_array_free (saved_env, TRUE); } + g_free (original_cwd); g_free (path); g_free (command_line); g_free (opt_user); |