lkml.org 
[lkml]   [1999]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Question: mount options for iso9660
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.055 / U:2.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site