mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
1999-04-09 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gmount.c (is_block_device_mountable): Allow root to mount devices.
This commit is contained in:
parent
1bf4926ff7
commit
aa723d5ddd
@ -1,3 +1,8 @@
|
||||
1999-04-09 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gmount.c (is_block_device_mountable): Allow root to mount
|
||||
devices.
|
||||
|
||||
1999-04-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtkflist.[ch]: New files. This is a "file list" widget derived
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user