diff options
author | Christian Persch <chpe@src.gnome.org> | 2009-03-23 12:12:51 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2009-03-23 12:12:51 +0000 |
commit | 62f5344c5b95ae64fd0321b654573cea369aef19 (patch) | |
tree | f3cd56c24963e8b02c95d765f7e51274fa5f4f72 | |
parent | 1d9e2356ebf937d0265104cc20ae4b6f3666b798 (diff) |
Bug 574491 – gnome-pty-helper can prevent volumes from being unmounted
* gnome-pty-helper/gnome-pty-helper.c: (main): chdir to /.
svn path=/trunk/; revision=2390
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gnome-pty-helper/gnome-pty-helper.c | 6 |
2 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2009-03-15 Christian Persch <chpe@gnome.org> + Bug 574491 – gnome-pty-helper can prevent volumes from being unmounted + + * gnome-pty-helper/gnome-pty-helper.c: (main): chdir to /. + +2009-03-15 Christian Persch <chpe@gnome.org> + * configure.in: Prepare version 0.20.0. 2009-03-15 Christian Persch <chpe@gnome.org> diff --git a/gnome-pty-helper/gnome-pty-helper.c b/gnome-pty-helper/gnome-pty-helper.c index fe502df..130cc24 100644 --- a/gnome-pty-helper/gnome-pty-helper.c +++ b/gnome-pty-helper/gnome-pty-helper.c @@ -665,6 +665,12 @@ main (int argc, char *argv []) login_name = login_name_buffer; } + /* Change directory so we don't prevent unmounting in case the initial cwd + * is on an external device (see bug #574491). + */ + if (chdir ("/") < 0) + fprintf (stderr, "Failed to chdir to /: %s\n", strerror (errno)); + display_name = getenv ("DISPLAY"); if (!display_name) display_name = "localhost"; |