]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/scm.h
Merge branch 'master' into next
[linux-2.6-omap-h63xx.git] / include / net / scm.h
index 423cb1d5ac2530dcd4a742f286b7d416be6b8f6e..f45bb6eca7d4263e179a203872c56c87f765ebe5 100644 (file)
@@ -4,6 +4,8 @@
 #include <linux/limits.h>
 #include <linux/net.h>
 #include <linux/security.h>
+#include <linux/pid.h>
+#include <linux/nsproxy.h>
 
 /* Well, we should have at least one descriptor open
  * to accept passed FDs 8)
@@ -12,8 +14,9 @@
 
 struct scm_fp_list
 {
-       int             count;
-       struct file     *fp[SCM_MAX_FD];
+       struct list_head        list;
+       int                     count;
+       struct file             *fp[SCM_MAX_FD];
 };
 
 struct scm_cookie
@@ -52,9 +55,9 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
                               struct scm_cookie *scm)
 {
        struct task_struct *p = current;
-       scm->creds.uid = p->uid;
-       scm->creds.gid = p->gid;
-       scm->creds.pid = p->tgid;
+       scm->creds.uid = current_uid();
+       scm->creds.gid = current_gid();
+       scm->creds.pid = task_tgid_vnr(p);
        scm->fp = NULL;
        scm->seq = 0;
        unix_get_peersec_dgram(sock, scm);