in reply to Re^2: mkdir with variable mask
in thread mkdir with variable mask
To add to what ikegami said...
Using umask plus the permission parameter to mkdir allows you to further avoid some potential race conditions. Along with executable stacks being exploited with buffer overflows, race conditions have been, at least by my memory, a significant contributor to security exploits.
It may be worth the couple of extra minutes to code the umask stuff and skip the chmod, especially if you do not have a full handle on how your code may be used in the future.
--MidLifeXis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: mkdir with variable mask
by ikegami (Patriarch) on Jan 26, 2009 at 17:45 UTC | |
by MidLifeXis (Monsignor) on Jan 26, 2009 at 18:05 UTC |