Messages in this thread Patch in this message | | | From | Wolfram Kleff <> | Subject | Bug fix Patches | Date | Sun, 20 Apr 1997 22:17:27 +0200 (MET DST) |
| |
Hello,
since there will be a Linux 2.0.31 (In 2.0.30 the noatime patch is only partly implemented, ISDN is completely broken.... :-( ), here are two bug fixes for 2.0.x and 2.1.x: In linux/fs/namei.c we should use S_IRWXUGO instead of S_IALLUGO (really ugly security bug). And for all people using the antique (and silent !) Mitsumi CDROM, there is a bug fix so we can hear CD music with mcdx. Well, workman still doesn't work with mcdx, but xmcd and xplaycd are OK now.
Hope that helps, Wolfram
diff -u linux/fs/namei.c linux/fs/namei.c --- linux/fs/namei.c Thu Mar 1 15:08:31 1997 +++ linux/fs/namei.c Thu Mar 1 17:11:40 1997 @@ -339,7 +339,16 @@ int namelen,error; struct inode * dir, *inode; - mode &= S_IALLUGO & ~current->fs->umask; + mode &= S_IRWXUGO & ~current->fs->umask; mode |= S_IFREG; error = dir_namei(pathname, &namelen, &basename, base, &dir); if (error) diff -u linux/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c --- linux/drivers/cdrom/mcdx.c Tue Jul 23 09:26:54 1996 +++ linux/drivers/cdrom/mcdx.c Sat Mar 1 15:27:46 1997 @@ -254,7 +254,7 @@ static int mcdx_requestmultidiskinfo(struct s_drive_stuff*, struct s_multi*, int); static int mcdx_requesttocdata(struct s_drive_stuff*, struct s_diskinfo*, int); static int mcdx_getstatus(struct s_drive_stuff*, int); -static int mcdx_getval(struct s_drive_stuff*, int to, int delay, char*); +static int mcdx_getval(struct s_drive_stuff*, int to, int delay, unsigned char*); static int mcdx_talk(struct s_drive_stuff*, const unsigned char* cmd, size_t, void *buffer, size_t size, @@ -792,7 +792,7 @@ stuffp->readcmd = stuffp->present | SINGLE ? READ1X : READ2X; #endif - /* try to get the first sector, iff any ... */ + /* try to get the first sector, if any ... */ if (stuffp->lastsector >= 0) { char buf[512]; int ans; @@ -1735,7 +1735,7 @@ struct s_subqcode *sub, int tries) { - char buf[11]; + unsigned char buf[11]; int ans; if (-1 == (ans = mcdx_talk( @@ -1758,7 +1758,7 @@ static int mcdx_requestmultidiskinfo(struct s_drive_stuff *stuffp, struct s_multi *multi, int tries) { - char buf[5]; + unsigned char buf[5]; int ans; if (stuffp->present & MULTI) { @@ -1777,7 +1777,7 @@ static int mcdx_requesttocdata(struct s_drive_stuff *stuffp, struct s_diskinfo *info, int tries) { - char buf[9]; + unsigned char buf[9]; int ans; ans = mcdx_talk(stuffp, "\x10", 1, buf, sizeof(buf), 2 * HZ, tries); if (ans == -1) { @@ -1799,7 +1799,7 @@ static int mcdx_setdrivemode(struct s_drive_stuff *stuffp, enum drivemodes mode, int tries) { - char cmd[2]; + unsigned char cmd[2]; int ans; xtrace(HW, "setdrivemode() %d\n", mode); @@ -1835,7 +1835,7 @@ static int mcdx_config(struct s_drive_stuff *stuffp, int tries) { - char cmd[4]; + unsigned char cmd[4]; xtrace(HW, "config()\n"); @@ -1856,7 +1856,7 @@ static int mcdx_requestversion(struct s_drive_stuff *stuffp, struct s_version *ver, int tries) { - char buf[3]; + unsigned char buf[3]; int ans; if (-1 == (ans = mcdx_talk(stuffp, "\xdc", @@ -1882,7 +1882,7 @@ static int mcdx_lockdoor(struct s_drive_stuff *stuffp, int lock, int tries) { - char cmd[2] = { 0xfe }; + unsigned char cmd[2] = { 0xfe }; if (stuffp->present & DOOR) { cmd[1] = lock ? 0x01 : 0x00; return mcdx_talk(stuffp, cmd, sizeof(cmd), NULL, 1, 5 * HZ, tries); @@ -1894,10 +1894,10 @@ { return mcdx_talk(stuffp, "\x40", 1, NULL, 1, 5 * HZ, tries); } static int -mcdx_getval(struct s_drive_stuff *stuffp, int to, int delay, char* buf) +mcdx_getval(struct s_drive_stuff *stuffp, int to, int delay, unsigned char* buf) { unsigned long timeout = to + jiffies; - char c; + unsigned char c; if (!buf) buf = &c; @@ -1917,7 +1917,7 @@ struct cdrom_volctrl* vol, int tries) { - char cmd[5]; + unsigned char cmd[5]; cmd[0] = 0xae; cmd[1] = vol->channel0; cmd[2] = 0;
| |