summaryrefslogtreecommitdiff
path: root/syslinux.c
diff options
context:
space:
mode:
authorhpa <hpa>2003-01-30 02:02:56 +0000
committerhpa <hpa>2003-01-30 02:02:56 +0000
commitea49eb042a599a875fa4508027ef5eb60079cc64 (patch)
treea546deb5ac4e1174e2c33cd91680ab770343cd0b /syslinux.c
parent2094b0420547123905bc458562c626f0504d7323 (diff)
downloadsyslinux-ea49eb042a599a875fa4508027ef5eb60079cc64.tar.gz
Support "owner" in /etc/fstab
Diffstat (limited to 'syslinux.c')
-rw-r--r--syslinux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/syslinux.c b/syslinux.c
index 3aafc15a..4519e032 100644
--- a/syslinux.c
+++ b/syslinux.c
@@ -336,14 +336,15 @@ int main(int argc, char *argv[])
!strcmp(mnt->mnt_type, "vfat") ||
!strcmp(mnt->mnt_type, "uvfat") ||
!strcmp(mnt->mnt_type, "auto") ) &&
- hasmntopt(mnt, "user") &&
+ ( hasmntopt(mnt, "user") ||
+ (hasmntopt(mnt, "owner") && st.st_uid == euid) ) &&
!hasmntopt(mnt, "ro") &&
mnt->mnt_dir[0] == '/' &&
!!hasmntopt(mnt, "loop") == !!S_ISREG(st.st_mode) &&
( (!hasmntopt(mnt,"offset") && offset == 0) ||
(atol(hasmntopt(mnt, "offset")) == offset) ) ) {
/* Okay, this is an fstab entry we should be able to live with. */
-
+
mntpath = mnt->mnt_dir;
break;
}