> the last >> 2 ones I don't know how to fix. The issue is that I need to do a stat >> before doing a mkdir or a rmdir and in between something could have >> happened on those directory and would lead to an unexpected result. >> Overall I don't think it is going to be a problem as it leads mostly to >> a failure (Non empty directory being deleted, or creating a directory >> that already exist), but if anyone has an idea. > > A good question. I was wondering about such situation in the other Time > of check time of use defects as well. :/
Most of these syscalls return errors and you check for those, without prior calls to stat(), for example mkdir -p would be implemented as trying to create all directories from root to leaf ignoring EEXIST. The TOCTOU errors are basically "you're doing useless stuff since you must check the syscall error anyway"... but are usually important if you fail to do the error checking, believing due prior check it would be all right. -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel