27 lines
711 B
Diff
27 lines
711 B
Diff
diff -urN linux-2.2.1/fs/proc/inode.c linux-caps/fs/proc/inode.c
|
|
--- linux-2.2.1/fs/proc/inode.c Fri May 8 18:10:30 1998
|
|
+++ linux-caps/fs/proc/inode.c Sun Jan 31 00:02:05 1999
|
|
@@ -267,10 +267,19 @@
|
|
|
|
inode->u.generic_ip = (void *) de;
|
|
if (de) {
|
|
- if (de->mode) {
|
|
+ if (de->mode) { /* why conditional on non-zero mode? */
|
|
+ struct inode *sbi;
|
|
+
|
|
inode->i_mode = de->mode;
|
|
- inode->i_uid = de->uid;
|
|
- inode->i_gid = de->gid;
|
|
+
|
|
+ if ((ino != PROC_ROOT_INO)
|
|
+ && (sbi = sb->s_root->d_inode)) {
|
|
+ inode->i_uid = sbi->i_uid;
|
|
+ inode->i_gid = sbi->i_gid;
|
|
+ } else {
|
|
+ inode->i_uid = de->uid;
|
|
+ inode->i_gid = de->gid;
|
|
+ }
|
|
}
|
|
if (de->size)
|
|
inode->i_size = de->size;
|