1 diff -urN linux.orig/linux-2.2.21-ow1/linux-2.2.21-ow1.diff linux/linux-2.2.21-ow1/linux-2.2.21-ow1.diff
2 --- linux.orig/linux-2.2.21-ow1/linux-2.2.21-ow1.diff Sat May 25 19:44:23 2002
3 +++ linux/linux-2.2.21-ow1/linux-2.2.21-ow1.diff Sat Aug 24 11:53:04 2002
8 -diff -urPX nopatch linux-2.2.21/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
9 ---- linux-2.2.21/arch/alpha/kernel/entry.S Fri Nov 2 19:39:05 2001
10 -+++ linux/arch/alpha/kernel/entry.S Sat May 25 20:26:03 2002
12 - lda $5,sys_call_table
13 - lda $27,sys_ni_syscall
15 -- ldq $3,TASK_FLAGS($8)
16 -+ ldq $3,TASK_PTRACE($8)
17 - stq $17,SP_OFF+32($30)
19 - and $3,PT_PTRACED,$3
20 diff -urPX nopatch linux-2.2.21/arch/arm/config.in linux/arch/arm/config.in
21 --- linux-2.2.21/arch/arm/config.in Sun Mar 25 20:31:54 2001
22 +++ linux/arch/arm/config.in Sat May 25 20:26:03 2002
27 -diff -urPX nopatch linux-2.2.21/drivers/net/zlib.c linux/drivers/net/zlib.c
28 ---- linux-2.2.21/drivers/net/zlib.c Tue May 21 03:32:35 2002
29 -+++ linux/drivers/net/zlib.c Sat May 25 20:33:16 2002
30 -@@ -3938,7 +3938,6 @@
34 -- ZFREE(z, s->sub.trees.blens);
35 - Tracev((stderr, "inflate: trees ok, %d * %d bytes used\n",
36 - inflate_hufts, sizeof(inflate_huft)));
37 - if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
38 -diff -urPX nopatch linux-2.2.21/drivers/scsi/st.c linux/drivers/scsi/st.c
39 ---- linux-2.2.21/drivers/scsi/st.c Fri Nov 2 19:39:08 2001
40 -+++ linux/drivers/scsi/st.c Sat May 25 20:26:27 2002
41 -@@ -1463,7 +1463,7 @@
43 - if (STps->drv_block >= 0)
44 - STps->drv_block += 1;
48 - (STp->buffer)->buffer_bytes = bytes - transfer;
50 diff -urPX nopatch linux-2.2.21/fs/binfmt_aout.c linux/fs/binfmt_aout.c
51 --- linux-2.2.21/fs/binfmt_aout.c Fri Nov 2 19:39:08 2001
52 +++ linux/fs/binfmt_aout.c Sat May 25 20:26:27 2002
53 @@ -1430,59 +1395,6 @@
55 current->dumpable = was_dumpable;
57 -diff -urPX nopatch linux-2.2.21/fs/ext2/file.c linux/fs/ext2/file.c
58 ---- linux-2.2.21/fs/ext2/file.c Sun Mar 25 20:30:58 2001
59 -+++ linux/fs/ext2/file.c Sat May 25 20:26:27 2002
60 -@@ -164,15 +164,15 @@
62 - int i,buffercount,write_error, new_buffer;
63 - unsigned long limit;
66 - /* POSIX: mtime/ctime may not change for 0 count */
69 - /* This makes the bounds-checking arithmetic later on much more
71 -- if (((signed) count) < 0)
72 -+ if (((ssize_t) count) < 0)
76 - write_error = buffercount = 0;
78 - printk("ext2_file_write: inode = NULL\n");
79 -@@ -206,15 +206,15 @@
80 - /* If the fd's pos is already greater than or equal to the file
81 - * descriptor's offset maximum, then we need to return EFBIG for
82 - * any non-zero count (and we already tested for zero above). */
83 -- if (((unsigned) pos) >= 0x7FFFFFFFUL)
84 -+ if (((unsigned long) pos) >= 0x7FFFFFFFUL)
87 - /* If we are about to overflow the maximum file size, we also
88 - * need to return the error, but only if no bytes can be written
90 -- if (((unsigned) pos + count) > 0x7FFFFFFFUL) {
91 -+ if (((unsigned long) pos + count) > 0x7FFFFFFFUL) {
92 - count = 0x7FFFFFFFL - pos;
93 -- if (((signed) count) < 0)
94 -+ if (((ssize_t) count) < 0)
100 - limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
101 - if (limit < RLIM_INFINITY) {
102 -- if (((unsigned) pos+count) >= limit) {
103 -+ if (((unsigned long) pos + count) >= limit) {
104 - count = limit - pos;
105 -- if (((signed) count) <= 0) {
106 -+ if (((ssize_t) count) <= 0) {
107 - send_sig(SIGXFSZ, current, 0);
110 diff -urPX nopatch linux-2.2.21/fs/namei.c linux/fs/namei.c
111 --- linux-2.2.21/fs/namei.c Fri Nov 2 19:39:08 2001
112 +++ linux/fs/namei.c Sat May 25 20:26:27 2002
113 @@ -1717,25 +1629,6 @@
115 if (ino & PROC_PID_FD_DIR) {
117 -diff -urPX nopatch linux-2.2.21/fs/proc/proc_tty.c linux/fs/proc/proc_tty.c
118 ---- linux-2.2.21/fs/proc/proc_tty.c Sun Mar 25 20:30:58 2001
119 -+++ linux/fs/proc/proc_tty.c Sat May 25 20:26:27 2002
120 -@@ -178,7 +178,14 @@
123 - proc_tty_ldisc = create_proc_entry("tty/ldisc", S_IFDIR, 0);
124 -- proc_tty_driver = create_proc_entry("tty/driver", S_IFDIR, 0);
126 -+ * /proc/tty/driver/serial reveals the exact character counts for
127 -+ * serial links which is just too easy to abuse for inferring
128 -+ * password lengths and inter-keystroke timings during password
131 -+ proc_tty_driver = create_proc_entry("tty/driver",
132 -+ S_IFDIR | S_IRUSR | S_IXUSR, 0);
134 - ent = create_proc_entry("tty/ldiscs", 0, 0);
135 - ent->read_proc = tty_ldiscs_read_proc;
136 diff -urPX nopatch linux-2.2.21/fs/proc/root.c linux/fs/proc/root.c
137 --- linux-2.2.21/fs/proc/root.c Tue May 21 03:32:35 2002
138 +++ linux/fs/proc/root.c Sat May 25 20:26:27 2002
139 @@ -1954,17 +1847,6 @@
143 -diff -urPX nopatch linux-2.2.21/include/linux/stat.h linux/include/linux/stat.h
144 ---- linux-2.2.21/include/linux/stat.h Sun Mar 25 20:31:03 2001
145 -+++ linux/include/linux/stat.h Sat May 25 20:26:53 2002
147 - #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
148 - #define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
149 - #define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
150 -+#define S_IRXUG (S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP)
154 diff -urPX nopatch linux-2.2.21/ipc/shm.c linux/ipc/shm.c
155 --- linux-2.2.21/ipc/shm.c Sun Mar 25 20:37:40 2001
156 +++ linux/ipc/shm.c Sat May 25 20:26:53 2002
157 @@ -2094,120 +1976,6 @@
158 return do_syslog(type, buf, len);
163 - spin_lock_irqsave(&console_lock, flags);
164 - va_start(args, fmt);
165 -- i = vsprintf(buf + 3, fmt, args); /* hopefully i < sizeof(buf)-4 */
166 -+ i = _vsnprintf(buf + 3, sizeof(buf) - sizeof(buf) / 8 - 3, fmt, args);
167 - buf_end = buf + 3 + i;
169 - for (p = buf + 3; p < buf_end; p++) {
170 -diff -urPX nopatch linux-2.2.21/kernel/sys.c linux/kernel/sys.c
171 ---- linux-2.2.21/kernel/sys.c Sun Mar 25 20:37:40 2001
172 -+++ linux/kernel/sys.c Sat May 25 21:27:04 2002
174 - if (euid != current->euid)
175 - current->dumpable = 0;
176 - current->euid = euid;
177 -- current->fsuid = euid;
179 -+ current->fsuid = current->euid;
180 - if (suid != (uid_t) -1)
181 - current->suid = suid;
184 - if (egid != current->egid)
185 - current->dumpable = 0;
186 - current->egid = egid;
187 -- current->fsgid = egid;
189 -+ current->fsgid = current->egid;
190 - if (sgid != (gid_t) -1)
191 - current->sgid = sgid;
193 -diff -urPX nopatch linux-2.2.21/kernel/sysctl.c linux/kernel/sysctl.c
194 ---- linux-2.2.21/kernel/sysctl.c Sun Mar 25 20:37:40 2001
195 -+++ linux/kernel/sysctl.c Sat May 25 20:26:53 2002
196 -@@ -338,8 +338,11 @@
200 -- if(get_user(old_len, oldlenp))
201 -+ if (get_user(old_len, oldlenp))
203 -+ /* XXX: insufficient for SMP, but should be redundant anyway */
204 -+ if ((ssize_t)old_len < 0)
207 - tmp = &root_table_header;
210 - * zero, proceed with automatic r/w */
211 - if (table->data && table->maxlen) {
212 - if (oldval && oldlenp) {
213 -- get_user(len, oldlenp);
214 -+ if (get_user(len, oldlenp))
217 - if (len > table->maxlen)
218 - len = table->maxlen;
219 -@@ -1047,7 +1051,8 @@
221 - for (i = 0; i < length; i++) {
223 -- get_user(value, vec + i);
224 -+ if (get_user(value, vec + i))
226 - if (min && value < min[i])
228 - if (max && value > max[i])
229 -diff -urPX nopatch linux-2.2.21/lib/vsprintf.c linux/lib/vsprintf.c
230 ---- linux-2.2.21/lib/vsprintf.c Sun Mar 25 20:31:02 2001
231 -+++ linux/lib/vsprintf.c Sat May 25 20:26:53 2002
233 - /* Forward decl. needed for IP address printing stuff... */
234 - int sprintf(char * buf, const char *fmt, ...);
236 --int vsprintf(char *buf, const char *fmt, va_list args)
237 -+int _vsnprintf(char *buf, int n, const char *fmt, va_list args)
242 - number of chars for from string */
243 - int qualifier; /* 'h', 'l', or 'L' for integer fields */
245 -- for (str=buf ; *fmt ; ++fmt) {
246 -+ for (str = buf; *fmt && (n == -1 || str - buf < n); ++fmt) {
250 -@@ -231,6 +231,12 @@
252 - len = strnlen(s, precision);
254 -+ if (n != -1 && len >= n - (str - buf)) {
255 -+ len = n - 1 - (str - buf);
256 -+ if (len <= 0) break;
257 -+ if (len < field_width) field_width = len;
260 - if (!(flags & LEFT))
261 - while (len < field_width--)
263 -@@ -304,6 +310,11 @@
269 -+int vsprintf(char *buf, const char *fmt, va_list args)
271 -+ return _vsnprintf(buf, -1, fmt, args);
274 - int sprintf(char * buf, const char *fmt, ...)
275 diff -urPX nopatch linux-2.2.21/mm/mmap.c linux/mm/mmap.c
276 --- linux-2.2.21/mm/mmap.c Sun Mar 25 20:31:02 2001
277 +++ linux/mm/mmap.c Sat May 25 20:26:53 2002