diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-07-03 15:04:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-07-03 15:04:16 +0000 |
commit | 9d7a2d4eaeba63661e2c1bcac39c28d9dc79f25d (patch) | |
tree | b21311e49adf7de938123fae9f6c6e025ef936c8 /src | |
parent | ff3f2e59f564a79eba821337feaa9a1fb3ec936d (diff) | |
download | tor-9d7a2d4eaeba63661e2c1bcac39c28d9dc79f25d.tar.gz tor-9d7a2d4eaeba63661e2c1bcac39c28d9dc79f25d.zip |
r16689@tombo: nickm | 2008-07-03 11:03:14 -0400
Fix for bug 742: do not use O_CREAT on 2-option version of open(). Especially do not use it on /dev/null. Fix from Michael Scherer. Bugfix on 0.0.2pre19 (wow).
svn:r15626
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c index 17962fc723..47d6aecd8c 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -3084,8 +3084,7 @@ finish_daemon(const char *desired_cwd) exit(1); } - nullfd = open("/dev/null", - O_CREAT | O_RDWR | O_APPEND); + nullfd = open("/dev/null", O_RDWR | O_APPEND); if (nullfd < 0) { log_err(LD_GENERAL,"/dev/null can't be opened. Exiting."); exit(1); |