OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH 6/6]: Enable unsharing pid namespace.
Re: [RFC][PATCH 6/6]: Enable unsharing pid namespace. [message #17781 is a reply to message #17748] Tue, 13 March 2007 08:27 Go to previous messageGo to previous message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
> | > Index: lx26-20-mm2b/kernel/nsproxy.c
> | > ===================================================================
> | > --- lx26-20-mm2b.orig/kernel/nsproxy.c	2007-03-09 14:56:12.000000000 -0800
> | > +++ lx26-20-mm2b/kernel/nsproxy.c	2007-03-09 15:03:05.000000000 -0800
> | > @@ -83,13 +83,16 @@ int copy_namespaces(int flags, struct ta
> | >  	struct nsproxy *old_ns = tsk->nsproxy;
> | >  	struct nsproxy *new_ns;
> | >  	int err = 0;
> | > +	int ns_all;
> | >  
> | >  	if (!old_ns)
> | >  		return 0;
> | >  
> | >  	get_nsproxy(old_ns);
> | >  
> | > -	if (!(flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC)))
> | > +	ns_all = CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWPID;
> | > +
> | 
> | This doesn't quite seem to make sense why the extra intermediate variable?
> 
> Will drop ns_all variable.

well, in the patch reserving the pid namespace clone flags, 
we could define : 

#define NS_ALL	(CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWPID)

which is useful in many ways.

cheers,

C.
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC][PATCH 3/6] pid namespace : use struct pid_nr
Next Topic: [RFC] ns containers (v2): namespace entering
Goto Forum:
  


Current Time: Thu Aug 14 12:08:38 GMT 2025

Total time taken to generate the page: 0.48539 seconds