From aa723d5ddd3f1d385cd8a7567a5925fa8157f3e9 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 10 Apr 1999 00:40:32 +0000 Subject: [PATCH] 1999-04-09 Miguel de Icaza * gmount.c (is_block_device_mountable): Allow root to mount devices. --- gnome/ChangeLog | 5 +++++ gnome/gmount.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index ee20c3e2e..487187f09 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +1999-04-09 Miguel de Icaza + + * gmount.c (is_block_device_mountable): Allow root to mount + devices. + 1999-04-09 Federico Mena Quintero * gtkflist.[ch]: New files. This is a "file list" widget derived diff --git a/gnome/gmount.c b/gnome/gmount.c index 19aa03f95..109db482a 100644 --- a/gnome/gmount.c +++ b/gnome/gmount.c @@ -134,9 +134,6 @@ is_block_device_mountable (char *mount_point) struct mntent *mnt; char *retval = NULL; - if (getuid () == 0) - return NULL; - f = setmntent ("/etc/fstab", "r"); if (f == NULL) return NULL; @@ -152,6 +149,11 @@ is_block_device_mountable (char *mount_point) continue; } + if (getuid () == 0){ + retval = g_strdup (mnt->mnt_dir); + break; + } + if (option_has_user (mnt->mnt_opts)){ retval = g_strdup (mnt->mnt_dir); break;