Re: [kvm-devel] [Lguest] [RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Tim Post
On Thu, 2008-03-20 at 17:05 +1100, Rusty Russell wrote: + snprintf(memfile_path, PATH_MAX, %s/.lguest, getenv(HOME) ?: ); Hi Rusty, Is that safe if being run via setuid/gid or shared root? It might be better to just look it up in /etc/passwd against the real UID, considering that anyone

Re: [kvm-devel] [Lguest] [RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Paul TBBle Hampson
On Thu, Mar 20, 2008 at 04:16:00PM +0800, Tim Post wrote: On Thu, 2008-03-20 at 17:05 +1100, Rusty Russell wrote: + snprintf(memfile_path, PATH_MAX, %s/.lguest, getenv(HOME) ?: ); Hi Rusty, Is that safe if being run via setuid/gid or shared root? It might be better to just look it up

Re: [kvm-devel] [Lguest] [RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Paul TBBle Hampson
On Thu, Mar 20, 2008 at 09:04:17AM -0500, Anthony Liguori wrote: Rusty Russell wrote: From: Paul TBBle Hampson [EMAIL PROTECTED] This creates a file in $HOME/.lguest/ to directly back the RAM and DMA memory mappings created by map_zeroed_pages. I created a test program recently that

Re: [kvm-devel] [Lguest] [RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Rusty Russell
On Thursday 20 March 2008 19:16:00 Tim Post wrote: On Thu, 2008-03-20 at 17:05 +1100, Rusty Russell wrote: + snprintf(memfile_path, PATH_MAX, %s/.lguest, getenv(HOME) ?: ); Hi Rusty, Is that safe if being run via setuid/gid or shared root? It might be better to just look it up in