- merge revision 1.4
authorMark Huang <mlhuang@cs.princeton.edu>
Thu, 27 Jan 2005 20:44:59 +0000 (20:44 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Thu, 27 Jan 2005 20:44:59 +0000 (20:44 +0000)
date: 2005/01/19 22:42:27;  author: mef;  state: Exp;  lines: +3 -4
Fixes CAN-2004 security reports 1016, 1017, and 1068

include/net/af_unix.h

index 79314ff..621c64f 100644 (file)
@@ -43,16 +43,14 @@ static inline struct sock *first_unix_socket(int *i)
 #define forall_unix_sockets(i, s) \
        for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s)))
 
-struct unix_address
-{
+struct unix_address {
        atomic_t        refcnt;
        int             len;
        unsigned        hash;
        struct sockaddr_un name[0];
 };
 
-struct unix_skb_parms
-{
+struct unix_skb_parms {
        struct ucred            creds;          /* Skb credentials      */
        struct scm_fp_list      *fp;            /* Passed files         */
 };
@@ -74,6 +72,7 @@ struct unix_sock {
         struct dentry          *dentry;
         struct vfsmount                *mnt;
         struct semaphore        readsem;
+        struct sock            *peer;
         struct sock            *other;
         struct sock            *gc_tree;
         atomic_t                inflight;