From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 3/3] Masquerade sender and limit system-wide signals Date: Thu, 30 Aug 2007 11:24:15 +0400 Message-ID: <20070830072415.GA232@tv-sign.ru> References: <20070830062210.GC29340@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20070830062210.GC29340-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org Cc: Containers , Pavel Emelianov List-Id: containers.vger.kernel.org On 08/29, sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org wrote: > > +static void masquerade_sender(struct task_struct *t, struct sigqueue *q) > +{ > + /* > + * If the sender does not have a pid_t in the receiver's active > + * pid namespace, set si_pid to 0 and pretend signal originated > + * from the kernel. > + */ > + if (!pid_ns_equal(t)) { > + q->info.si_pid = 0; > + q->info.si_code = SI_KERNEL; > + } Just curious, shouldn't we also clear si_uid ? Oleg.