[PATCH] autobuild: Stop waf uninstall from removing test_tmpdir

Martin Schwenke martin at meltin.net
Mon Mar 20 10:26:15 UTC 2017


On Mon, 20 Mar 2017 10:19:49 +0100, Andreas Schneider <asn at samba.org>
wrote:

> On Monday, 20 March 2017 09:53:08 CET Stefan Metzmacher via samba-technical 
> wrote:
> > Hi Martin,
> >   
>  [...]  
> > 
> > How did you find that?  
> 
> One possibility is to use socket_wrapper and wrap rmdir(), then you can can do 
> something like:
> 
> int rmdir(const char *path)
> {
> 	if (strcmp(path, "/tmp") == 0) {
> 		abort();
> 	}
> 
> 	...
> }

Hmmm.  I never think about socket_wrapper.  That would have been
equivalent to my big hammer chattr idea, without needing root.  It would
have aborted the recursive waf invocation, so would have taken me
straight to distcheck().

Must... remember... to... use... socket_wrapper!  :-)

Thanks!

peace & happiness,
martin



More information about the samba-technical mailing list