aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-10-02 05:17:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:14 -0400
commit609d7fa9565c754428d2520cac2accc9052e1245 (patch)
tree1c5114ec3720166fe99ce3885e8767929a8a84e0 /include
parentbde0d2c98bcfc9acc83ac79c33a6ac1335b95a92 (diff)
[PATCH] file: modify struct fown_struct to use a struct pid
File handles can be requested to send sigio and sigurg to processes. By tracking the destination processes using struct pid instead of pid_t we make the interface safe from all potential pid wrap around problems. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2e29a2edaeec..91c0b2a32a90 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -684,7 +684,8 @@ extern struct block_device *I_BDEV(struct inode *inode);
684 684
685struct fown_struct { 685struct fown_struct {
686 rwlock_t lock; /* protects pid, uid, euid fields */ 686 rwlock_t lock; /* protects pid, uid, euid fields */
687 int pid; /* pid or -pgrp where SIGIO should be sent */ 687 struct pid *pid; /* pid or -pgrp where SIGIO should be sent */
688 enum pid_type pid_type; /* Kind of process group SIGIO should be sent to */
688 uid_t uid, euid; /* uid/euid of process setting the owner */ 689 uid_t uid, euid; /* uid/euid of process setting the owner */
689 int signum; /* posix.1b rt signal to be delivered on IO */ 690 int signum; /* posix.1b rt signal to be delivered on IO */
690}; 691};
@@ -880,8 +881,10 @@ extern void kill_fasync(struct fasync_struct **, int, int);
880/* only for net: no internal synchronization */ 881/* only for net: no internal synchronization */
881extern void __kill_fasync(struct fasync_struct *, int, int); 882extern void __kill_fasync(struct fasync_struct *, int, int);
882 883
884extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
883extern int f_setown(struct file *filp, unsigned long arg, int force); 885extern int f_setown(struct file *filp, unsigned long arg, int force);
884extern void f_delown(struct file *filp); 886extern void f_delown(struct file *filp);
887extern pid_t f_getown(struct file *filp);
885extern int send_sigurg(struct fown_struct *fown); 888extern int send_sigurg(struct fown_struct *fown);
886 889
887/* 890/*