[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: Question: mount options for iso9660
From: Meelis Roos <mroos () tartu ! cyber ! ee>
Date: 1999-04-30 20:49:20
[Download RAW message or body]
JB> If not, would someone be so kind and have a look at it, if it doesn't
JB> require a complete kernel rewrite <g>? There's a free Pizza Hut coupon for
JB> the first working patch :)
Try the patch below. It works for me (2.2.7 on x86). And it should be
quite a portable too AFAICS.
Sorry I can't us the pizza coupon here in Estonia ;-(
diff -ur linux-2.2.2/fs/isofs/inode.c linux-hacked/fs/isofs/inode.c
--- linux-2.2.2/fs/isofs/inode.c Tue Dec 29 21:40:35 1998
+++ linux-hacked/fs/isofs/inode.c Fri Apr 30 22:18:48 1999
@@ -126,6 +126,7 @@
uid_t uid;
char *iocharset;
unsigned char utf8;
+ char force;
};
/*
@@ -290,6 +291,7 @@
be shared with DOS machines so
virtually anything could be
a valid executable. */
+ popt->force = 'n'; /* force mode bits */
popt->gid = 0;
popt->uid = 0;
popt->iocharset = NULL;
@@ -316,6 +318,10 @@
popt->utf8 = 1;
continue;
}
+ if (strncmp(this_char,"force",5) == 0) {
+ popt->force = 'y';
+ continue;
+ }
if ((value = strchr(this_char,'=')) != NULL)
*value++ = 0;
@@ -491,6 +497,7 @@
printk("gid = %d\n", opt.gid);
printk("uid = %d\n", opt.uid);
printk("iocharset = %s\n", opt.iocharset);
+ printk("force = %s\n", opt.force);
#endif
/*
@@ -754,6 +761,7 @@
s->u.isofs_sb.s_uid = opt.uid;
s->u.isofs_sb.s_gid = opt.gid;
s->u.isofs_sb.s_utf8 = opt.utf8;
+ s->u.isofs_sb.s_force = opt.force;
/*
* It would be incredibly stupid to allow people to mark every file on the disk
* as suid, so we merely allow them to set the default permissions.
diff -ur linux-2.2.2/fs/isofs/rock.c linux-hacked/fs/isofs/rock.c
--- linux-2.2.2/fs/isofs/rock.c Sat Sep 26 02:27:13 1998
+++ linux-hacked/fs/isofs/rock.c Fri Apr 30 23:38:45 1999
@@ -271,6 +271,12 @@
break;
case SIG('P','X'):
inode->i_mode = isonum_733(rr->u.PX.mode);
+ if (inode->i_sb->u.isofs_sb.s_force == 'y') {
+ inode->i_mode &= ~(S_IRUGO | S_IWUGO);
+ if (!S_ISDIR (inode->i_mode))
+ inode->i_mode &= ~S_IXUGO;
+ inode->i_mode |= inode->i_sb->u.isofs_sb.s_mode;
+ }
inode->i_nlink = isonum_733(rr->u.PX.n_links);
inode->i_uid = isonum_733(rr->u.PX.uid);
inode->i_gid = isonum_733(rr->u.PX.gid);
--
Meelis Roos (mroos@tartu.cyber.ee)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic