patch-1.3.7 linux/fs/proc/inode.c
Next file: linux/fs/proc/scsi.c
Previous file: linux/fs/isofs/dir.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Thu Jul 6 13:24:46 1995
- Orig file:
v1.3.6/linux/fs/proc/inode.c
- Orig date:
Thu Jun 29 19:02:54 1995
diff -u --recursive --new-file v1.3.6/linux/fs/proc/inode.c linux/fs/proc/inode.c
@@ -170,6 +170,15 @@
inode->i_op = &proc_scsi_inode_operations;
return;
}
+ /*
+ * Special hook used when scsi is not present.
+ */
+ if (ino == PROC_SCSI_NOT_PRESENT) {
+ inode->i_mode = S_IFREG | S_IRUGO | S_IXUGO;
+ inode->i_op = &proc_scsi_inode_operations;
+ return;
+ }
+
/* files within /proc/scsi */
if ((ino > PROC_SCSI_SCSI) && (ino < PROC_SCSI_FILE)) {
inode->i_nlink = 2;
@@ -221,7 +230,8 @@
return;
}
ino &= 0x0000ffff;
- if (p->dumpable && p->uid == p->euid && p->gid == p->egid) {
+ if (ino == PROC_PID_INO ||
+ (p->dumpable && p->uid == p->euid && p->gid == p->egid)) {
inode->i_uid = p->uid;
inode->i_gid = p->gid;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this