Re: [dev] [sbase] cp and security

2011-06-24 Thread Connor Lane Smith
Hey, On 23 June 2011 22:59, Random832 wrote: > Emulate fchdir with a "magic cookie" struct containing an absolute path, > device, and inode number [stat(".") every time and panic if device and > inode number don't match the cookie] Do you think we could rely on just the physical path, in order t

[dev] [sbase] cp and security

2011-06-23 Thread Random832
I've written most of cp, but one issue keeps bugging me. I can't figure out how to get rid of race conditions within the constraints that sbase is implemented in (POSIX 2001, no XSI extensions). If we were using POSIX 2008 or XSI extensions, I could use the at() functions, or at least fchdir(),