patch-2.2.12 linux/fs/proc/array.c
Next file: linux/fs/select.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Wed Aug 25 17:29:49 1999
- Orig file:
v2.2.11/linux/fs/proc/array.c
- Orig date:
Mon Aug 9 16:05:57 1999
diff -u --recursive --new-file v2.2.11/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -76,6 +76,11 @@
#endif
+static int open_kcore(struct inode * inode, struct file * filp)
+{
+ return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
+}
+
static ssize_t read_core(struct file * file, char * buf,
size_t count, loff_t *ppos)
{
@@ -140,6 +145,12 @@
static struct file_operations proc_kcore_operations = {
NULL, /* lseek */
read_core,
+ NULL, /* write */
+ NULL, /* readdir */
+ NULL, /* poll */
+ NULL, /* ioctl */
+ NULL, /* mmap */
+ open_kcore
};
struct inode_operations proc_kcore_inode_operations = {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)