lkml.org 
[lkml]   [1999]   [May]   [15]   [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> Sorry, it doesn't work with plain vanilla 2.2.7 (neither with 2.2.8) here.

Oops, it was my mistake. I accidentally deleted the chunk for a include
file. Here is the complete patch, tested on 2.2.8:

--- linux/fs/isofs/inode.c Tue Dec 29 21:40:35 1998
+++ linux-hacked/fs/isofs/inode.c Fri May 14 16:12:26 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 -ru linux/fs/isofs/rock.c linux-hacked/fs/isofs/rock.c
--- linux/fs/isofs/rock.c Sat Sep 26 02:27:13 1998
+++ linux-hacked/fs/isofs/rock.c Fri May 14 16:12:27 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);
diff -ru linux/include/linux/iso_fs_sb.h linux-hacked/include/linux/iso_fs_sb.h
--- linux/include/linux/iso_fs_sb.h Wed Aug 26 19:54:41 1998
+++ linux-hacked/include/linux/iso_fs_sb.h Fri May 14 16:16:27 1999
@@ -22,6 +22,7 @@
unsigned char s_unhide;
unsigned char s_nosuid;
unsigned char s_nodev;
+ unsigned char s_force;
mode_t s_mode;
gid_t s_gid;
uid_t s_uid;
--
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.062 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site