diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/alpha/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/alpha/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/alpha/kernel/ptrace.c	2006-07-09 17:06:47 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/alpha/kernel/ptrace.c	2006-08-06 06:00:35 +0200
@@ -284,7 +284,7 @@ do_sys_ptrace(long request, long pid, lo
 		goto out_notsk;
 	}
 
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) {
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT)) {
 		ret = -EPERM;
 		goto out;
 	}
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/ia64/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/ia64/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/ia64/kernel/ptrace.c	2006-07-09 17:06:47 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/ia64/kernel/ptrace.c	2006-08-06 06:00:44 +0200
@@ -1444,7 +1444,7 @@ sys_ptrace (long request, pid_t pid, uns
 	read_unlock(&tasklist_lock);
 	if (!child)
 		goto out;
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT))
 		goto out_tsk;
 
 	ret = -EPERM;
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/m68k/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/m68k/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/m68k/kernel/ptrace.c	2006-07-09 17:06:47 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/m68k/kernel/ptrace.c	2006-08-06 06:00:54 +0200
@@ -280,7 +280,7 @@ long arch_ptrace(struct task_struct *chi
 		ret = ptrace_request(child, request, addr, data);
 		break;
 	}
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT))
 		goto out_tsk;
 
 	return ret;
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/mips/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/mips/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/mips/kernel/ptrace.c	2006-07-09 17:06:47 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/mips/kernel/ptrace.c	2006-08-06 06:01:04 +0200
@@ -490,7 +490,7 @@ asmlinkage void do_syscall_trace(struct 
 		goto out;
 	if (!test_thread_flag(TIF_SYSCALL_TRACE))
 		goto out;
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT))
 		goto out_tsk;
 
 	/* The 0x80 provides a way for the tracing parent to distinguish
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/s390/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/s390/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/s390/kernel/ptrace.c	2006-07-09 17:06:48 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/s390/kernel/ptrace.c	2006-08-06 06:01:15 +0200
@@ -723,7 +723,7 @@ sys_ptrace(long request, long pid, long 
 		goto out;
 	}
 
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) {
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT)) {
 		ret = -EPERM;
 		goto out_tsk;
 	}
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/sparc/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/sparc/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/sparc/kernel/ptrace.c	2006-07-09 17:06:48 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/sparc/kernel/ptrace.c	2006-08-06 06:01:25 +0200
@@ -300,7 +300,7 @@ asmlinkage void do_ptrace(struct pt_regs
 		pt_error_return(regs, -ret);
 		goto out;
 	}
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) {
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT)) {
 		pt_error_return(regs, ESRCH);
 		goto out_tsk;
 	}
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/sparc64/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/sparc64/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/sparc64/kernel/ptrace.c	2006-07-09 17:06:48 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/sparc64/kernel/ptrace.c	2006-08-06 06:01:34 +0200
@@ -213,7 +213,7 @@ asmlinkage void do_ptrace(struct pt_regs
 		pt_error_return(regs, -ret);
 		goto out;
 	}
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) {
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT)) {
 		pt_error_return(regs, ESRCH);
 		goto out_tsk;
 	}
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/arch/v850/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/arch/v850/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/arch/v850/kernel/ptrace.c	2006-07-27 19:03:22 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/arch/v850/kernel/ptrace.c	2006-08-06 06:01:44 +0200
@@ -117,7 +117,7 @@ long arch_ptrace(struct task_struct *chi
 {
 	int rval;
 
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT))
 		goto out;
 
 	switch (request) {
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/fs/devpts/inode.c linux-2.6.17.7-vs2.1.1-rc28.1/fs/devpts/inode.c
--- linux-2.6.17.7-vs2.1.1-rc28/fs/devpts/inode.c	2006-07-09 17:06:49 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/fs/devpts/inode.c	2006-08-06 06:14:56 +0200
@@ -26,7 +26,7 @@ static int devpts_permission(struct inod
 	int ret = -EACCES;
 
 	/* devpts is xid tagged */
-	if (vx_check((xid_t)inode->i_tag, VX_IDENT))
+	if (vx_check((xid_t)inode->i_tag, VX_WATCH_P|VX_IDENT))
 		ret = generic_permission(inode, mask, NULL);
 	return ret;
 }
@@ -107,7 +107,7 @@ static int devpts_remount(struct super_b
 static int devpts_filter(struct dentry *de)
 {
 	/* devpts is xid tagged */
-	return vx_check((xid_t)de->d_inode->i_tag, VX_IDENT);
+	return vx_check((xid_t)de->d_inode->i_tag, VX_WATCH_P|VX_IDENT);
 }
 
 static int devpts_readdir(struct file * filp, void * dirent, filldir_t filldir)
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/fs/locks.c linux-2.6.17.7-vs2.1.1-rc28.1/fs/locks.c
--- linux-2.6.17.7-vs2.1.1-rc28/fs/locks.c	2006-07-09 17:06:49 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/fs/locks.c	2006-08-06 06:03:34 +0200
@@ -2142,7 +2142,7 @@ int get_locks_status(char *buffer, char 
 		struct list_head *btmp;
 		struct file_lock *fl = list_entry(tmp, struct file_lock, fl_link);
 
-		if (!vx_check(fl->fl_xid, VX_IDENT|VX_WATCH))
+		if (!vx_check(fl->fl_xid, VX_WATCH_P|VX_IDENT))
 			continue;
 
 		lock_get_status(q, fl, ++i, "");
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/fs/namespace.c linux-2.6.17.7-vs2.1.1-rc28.1/fs/namespace.c
--- linux-2.6.17.7-vs2.1.1-rc28/fs/namespace.c	2006-08-05 04:01:24 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/fs/namespace.c	2006-08-06 05:54:54 +0200
@@ -406,7 +406,7 @@ static int show_vfsmnt(struct seq_file *
 
 	if (vx_flags(VXF_HIDE_MOUNT, 0))
 		return 0;
-	if (!mnt_is_reachable(mnt) && !vx_check(0, VX_WATCH))
+	if (!mnt_is_reachable(mnt) && !vx_check(0, VX_WATCH_P))
 		return 0;
 
 	if (!vx_check(0, VX_ADMIN|VX_WATCH) &&
@@ -451,7 +451,7 @@ static int show_vfsstat(struct seq_file 
 
 	if (vx_flags(VXF_HIDE_MOUNT, 0))
 		return 0;
-	if (!mnt_is_reachable(mnt) && !vx_check(0, VX_WATCH))
+	if (!mnt_is_reachable(mnt) && !vx_check(0, VX_WATCH_P))
 		return 0;
 
 	if (!vx_check(0, VX_ADMIN|VX_WATCH) &&
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/include/linux/vserver/context.h linux-2.6.17.7-vs2.1.1-rc28.1/include/linux/vserver/context.h
--- linux-2.6.17.7-vs2.1.1-rc28/include/linux/vserver/context.h	2006-07-30 16:50:15 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/include/linux/vserver/context.h	2006-08-06 05:52:41 +0200
@@ -188,6 +190,14 @@ struct vx_info_save {
 #define VX_ATR_MASK	0x0F00
 
 
+#ifdef	CONFIG_VSERVER_PRIVACY
+#define VX_ADMIN_P	(0)
+#define VX_WATCH_P	(0)
+#else
+#define VX_ADMIN_P	VX_ADMIN
+#define VX_WATCH_P	VX_WATCH
+#endif
+
 extern void claim_vx_info(struct vx_info *, struct task_struct *);
 extern void release_vx_info(struct vx_info *, struct task_struct *);
 
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/include/net/af_unix.h linux-2.6.17.7-vs2.1.1-rc28.1/include/net/af_unix.h
--- linux-2.6.17.7-vs2.1.1-rc28/include/net/af_unix.h	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/include/net/af_unix.h	2006-08-06 06:04:49 +0200
@@ -34,7 +34,7 @@ static inline struct sock *next_unix_soc
 			s = sk_next(s);
 		if (!s)
 			s = next_unix_socket_table(i);
-	} while (s && !vx_check(s->sk_xid, VX_IDENT|VX_WATCH));
+	} while (s && !vx_check(s->sk_xid, VX_WATCH_P|VX_IDENT));
 	return s;
 }
 
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/ipc/msg.c linux-2.6.17.7-vs2.1.1-rc28.1/ipc/msg.c
--- linux-2.6.17.7-vs2.1.1-rc28/ipc/msg.c	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/ipc/msg.c	2006-08-06 06:15:35 +0200
@@ -827,7 +827,7 @@ static int sysvipc_msg_proc_show(struct 
 {
 	struct msg_queue *msq = it;
 
-	if (!vx_check(msq->q_perm.xid, VX_IDENT))
+	if (!vx_check(msq->q_perm.xid, VX_WATCH_P|VX_IDENT))
 		return 0;
 
 	return seq_printf(s,
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/ipc/sem.c linux-2.6.17.7-vs2.1.1-rc28.1/ipc/sem.c
--- linux-2.6.17.7-vs2.1.1-rc28/ipc/sem.c	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/ipc/sem.c	2006-08-06 06:15:49 +0200
@@ -1351,7 +1351,7 @@ static int sysvipc_sem_proc_show(struct 
 {
 	struct sem_array *sma = it;
 
-	if (!vx_check(sma->sem_perm.xid, VX_IDENT))
+	if (!vx_check(sma->sem_perm.xid, VX_WATCH_P|VX_IDENT))
 		return 0;
 
 	return seq_printf(s,
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/ipc/shm.c linux-2.6.17.7-vs2.1.1-rc28.1/ipc/shm.c
--- linux-2.6.17.7-vs2.1.1-rc28/ipc/shm.c	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/ipc/shm.c	2006-08-06 06:16:05 +0200
@@ -926,7 +926,7 @@ static int sysvipc_shm_proc_show(struct 
 #define SMALL_STRING "%10d %10d  %4o %10u %5u %5u  %5d %5u %5u %5u %5u %10lu %10lu %10lu\n"
 #define BIG_STRING   "%10d %10d  %4o %21u %5u %5u  %5d %5u %5u %5u %5u %10lu %10lu %10lu\n"
 
-	if (!vx_check(shp->shm_perm.xid, VX_IDENT))
+	if (!vx_check(shp->shm_perm.xid, VX_WATCH_P|VX_IDENT))
 		return 0;
 
 	if (sizeof(size_t) <= sizeof(int))
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/ipc/util.c linux-2.6.17.7-vs2.1.1-rc28.1/ipc/util.c
--- linux-2.6.17.7-vs2.1.1-rc28/ipc/util.c	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/ipc/util.c	2006-08-06 06:19:33 +0200
@@ -160,7 +160,7 @@ int ipc_findkey(struct ipc_ids* ids, key
 		p = ids->entries->p[id];
 		if (p==NULL)
 			continue;
-		if (!vx_check(p->xid, VX_IDENT))
+		if (!vx_check(p->xid, VX_WATCH_P|VX_IDENT))
 			continue;
 		if (key == p->key)
 			return id;
@@ -474,7 +474,7 @@ int ipcperms (struct kern_ipc_perm *ipcp
 	if (unlikely((err = audit_ipc_obj(ipcp))))
 		return err;
 
-	if (!vx_check(ipcp->xid, VX_ADMIN|VX_IDENT)) /* maybe just VX_IDENT? */
+	if (!vx_check(ipcp->xid, VX_WATCH_P|VX_IDENT)) /* maybe just VX_IDENT? */
 		return -1;
 	requested_mode = (flag >> 6) | (flag >> 3) | flag;
 	granted_mode = ipcp->mode;
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/kernel/ptrace.c linux-2.6.17.7-vs2.1.1-rc28.1/kernel/ptrace.c
--- linux-2.6.17.7-vs2.1.1-rc28/kernel/ptrace.c	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/kernel/ptrace.c	2006-08-06 06:05:08 +0200
@@ -508,7 +508,7 @@ asmlinkage long sys_ptrace(long request,
 	}
 
 	ret = -EPERM;
-	if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+	if (!vx_check(vx_task_xid(child), VX_WATCH_P|VX_IDENT))
 		goto out_put_task_struct;
 
 	if (request == PTRACE_ATTACH) {
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/kernel/signal.c linux-2.6.17.7-vs2.1.1-rc28.1/kernel/signal.c
--- linux-2.6.17.7-vs2.1.1-rc28/kernel/signal.c	2006-07-09 17:07:13 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/kernel/signal.c	2006-08-06 06:17:14 +0200
@@ -591,7 +591,7 @@ static int check_kill_permission(int sig
 		return error;
 
 	error = -ESRCH;
-	if (user && !vx_check(vx_task_xid(t), VX_ADMIN|VX_IDENT))
+	if (user && !vx_check(vx_task_xid(t), VX_WATCH_P|VX_IDENT))
 		return error;
 
 	error = security_task_kill(t, info, sig);
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/kernel/vserver/Kconfig linux-2.6.17.7-vs2.1.1-rc28.1/kernel/vserver/Kconfig
--- linux-2.6.17.7-vs2.1.1-rc28/kernel/vserver/Kconfig	2006-07-09 17:07:14 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/kernel/vserver/Kconfig	2006-08-06 05:49:54 +0200
@@ -191,6 +191,14 @@ config	PROPAGATE
 	  a tagid which is to be used for the entire mount
 	  tree.
 
+config	VSERVER_PRIVACY
+	bool	"Honor Privacy Aspects of Guests"
+	default y
+	help
+	  When enabled, most context checks will disallow
+	  access to structures assigned to a specific context,
+	  like ptys or loop devices.
+
 config	VSERVER_DEBUG
 	bool	"VServer Debugging Code"
 	default n
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/inet_diag.c linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/inet_diag.c
--- linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/inet_diag.c	2006-07-09 17:07:14 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/inet_diag.c	2006-08-06 06:06:12 +0200
@@ -694,7 +694,7 @@ static int inet_diag_dump(struct sk_buff
 			sk_for_each(sk, node, &hashinfo->listening_hash[i]) {
 				struct inet_sock *inet = inet_sk(sk);
 
-				if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+				if (!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 					continue;
 				if (num < s_num) {
 					num++;
@@ -756,7 +756,7 @@ skip_listen_ht:
 		sk_for_each(sk, node, &head->chain) {
 			struct inet_sock *inet = inet_sk(sk);
 
-			if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+			if (!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 				continue;
 			if (num < s_num)
 				goto next_normal;
@@ -782,7 +782,7 @@ next_normal:
 			inet_twsk_for_each(tw, node,
 				    &hashinfo->ehash[i + hashinfo->ehash_size].chain) {
 
-				if (!vx_check(tw->tw_xid, VX_IDENT|VX_WATCH))
+				if (!vx_check(tw->tw_xid, VX_WATCH_P|VX_IDENT))
 					continue;
 				if (num < s_num)
 					goto next_dying;
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/raw.c linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/raw.c
--- linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/raw.c	2006-07-09 17:07:14 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/raw.c	2006-08-06 06:06:25 +0200
@@ -822,7 +822,7 @@ static struct sock *raw_get_first(struct
 
 		sk_for_each(sk, node, &raw_v4_htable[state->bucket])
 			if (sk->sk_family == PF_INET &&
-				vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+				vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 				goto found;
 	}
 	sk = NULL;
@@ -839,7 +839,7 @@ static struct sock *raw_get_next(struct 
 try_again:
 		;
 	} while (sk && (sk->sk_family != PF_INET ||
-		!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH)));
+		!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT)));
 
 	if (!sk && ++state->bucket < RAWV4_HTABLE_SIZE) {
 		sk = sk_head(&raw_v4_htable[state->bucket]);
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/tcp_ipv4.c linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/tcp_ipv4.c
--- linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/tcp_ipv4.c	2006-07-09 17:07:14 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/tcp_ipv4.c	2006-08-06 06:07:04 +0200
@@ -1360,7 +1360,7 @@ static void *listening_get_next(struct s
 					"sk,req: %p [#%d] (from %d)", req->sk,
 					(req->sk)?req->sk->sk_xid:0, vx_current_xid());
 				if (req->sk &&
-					!vx_check(req->sk->sk_xid, VX_IDENT|VX_WATCH))
+					!vx_check(req->sk->sk_xid, VX_WATCH_P|VX_IDENT))
 					continue;
 				if (req->rsk_ops->family == st->family) {
 					cur = req;
@@ -1388,7 +1388,7 @@ get_sk:
 	sk_for_each_from(sk, node) {
 		vxdprintk(VXD_CBIT(net, 6), "sk: %p [#%d] (from %d)",
 			sk, sk->sk_xid, vx_current_xid());
-		if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+		if (!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 			continue;
 		if (sk->sk_family == st->family) {
 			cur = sk;
@@ -1444,7 +1444,7 @@ static void *established_get_first(struc
 			vxdprintk(VXD_CBIT(net, 6),
 				"sk,egf: %p [#%d] (from %d)",
 				sk, sk->sk_xid, vx_current_xid());
-			if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+			if (!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 				continue;
 			if (sk->sk_family != st->family)
 				continue;
@@ -1457,7 +1457,7 @@ static void *established_get_first(struc
 			vxdprintk(VXD_CBIT(net, 6),
 				"tw: %p [#%d] (from %d)",
 				tw, tw->tw_xid, vx_current_xid());
-			if (!vx_check(tw->tw_xid, VX_IDENT|VX_WATCH))
+			if (!vx_check(tw->tw_xid, VX_WATCH_P|VX_IDENT))
 				continue;
 			if (tw->tw_family != st->family)
 				continue;
@@ -1485,7 +1485,7 @@ static void *established_get_next(struct
 		tw = tw_next(tw);
 get_tw:
 		while (tw && (tw->tw_family != st->family ||
-			!vx_check(tw->tw_xid, VX_IDENT|VX_WATCH))) {
+			!vx_check(tw->tw_xid, VX_WATCH_P|VX_IDENT))) {
 			tw = tw_next(tw);
 		}
 		if (tw) {
@@ -1512,7 +1512,7 @@ get_tw:
 		vxdprintk(VXD_CBIT(net, 6),
 			"sk,egn: %p [#%d] (from %d)",
 			sk, sk->sk_xid, vx_current_xid());
-		if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+		if (!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 			continue;
 		if (sk->sk_family == st->family)
 			goto found;
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/udp.c linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/udp.c
--- linux-2.6.17.7-vs2.1.1-rc28/net/ipv4/udp.c	2006-07-09 17:07:14 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/net/ipv4/udp.c	2006-08-06 06:07:14 +0200
@@ -1424,7 +1424,7 @@ static struct sock *udp_get_first(struct
 
 		sk_for_each(sk, node, &udp_hash[state->bucket]) {
 			if (sk->sk_family == state->family &&
-				vx_check(sk->sk_xid, VX_IDENT|VX_WATCH))
+				vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT))
 				goto found;
 		}
 	}
@@ -1442,7 +1442,7 @@ static struct sock *udp_get_next(struct 
 try_again:
 		;
 	} while (sk && (sk->sk_family != state->family ||
-		!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH)));
+		!vx_check(sk->sk_xid, VX_WATCH_P|VX_IDENT)));
 
 	if (!sk && ++state->bucket < UDP_HTABLE_SIZE) {
 		sk = sk_head(&udp_hash[state->bucket]);
diff -NurpP --minimal linux-2.6.17.7-vs2.1.1-rc28/net/unix/af_unix.c linux-2.6.17.7-vs2.1.1-rc28.1/net/unix/af_unix.c
--- linux-2.6.17.7-vs2.1.1-rc28/net/unix/af_unix.c	2006-07-09 17:07:14 +0200
+++ linux-2.6.17.7-vs2.1.1-rc28.1/net/unix/af_unix.c	2006-08-06 06:07:35 +0200
@@ -238,7 +238,7 @@ static struct sock *__unix_find_socket_b
 	sk_for_each(s, node, &unix_socket_table[hash ^ type]) {
 		struct unix_sock *u = unix_sk(s);
 
-		if (!vx_check(s->sk_xid, VX_IDENT|VX_WATCH))
+		if (!vx_check(s->sk_xid, VX_WATCH_P|VX_IDENT))
 			continue;
 		if (u->addr->len == len &&
 		    !memcmp(u->addr->name, sunname, len))
