diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-12-13 20:51:34 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-12-13 20:51:34 +0000 |
commit | bc36f71127f4514ddb55736340bcbff42f765486 (patch) | |
tree | 819917b822fee42ca41752be4df612eb9e491a91 /libexec/ld.so/ldconfig | |
parent | 791c069f5e246d05454eb8b2ddd1b0c2994e0bab (diff) |
rename() is the atomic operation, unlink() is just there to create
races between ldconfig and ld.so
(simple commit, hours of bug hunt...)
okay kettenis@, deraad@, miod@
Diffstat (limited to 'libexec/ld.so/ldconfig')
-rw-r--r-- | libexec/ld.so/ldconfig/ldconfig.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libexec/ld.so/ldconfig/ldconfig.c b/libexec/ld.so/ldconfig/ldconfig.c index bcd9ce0059a..5ad412d8ee9 100644 --- a/libexec/ld.so/ldconfig/ldconfig.c +++ b/libexec/ld.so/ldconfig/ldconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldconfig.c,v 1.27 2010/03/30 17:42:50 zinovik Exp $ */ +/* $OpenBSD: ldconfig.c,v 1.28 2010/12/13 20:51:33 espie Exp $ */ /* * Copyright (c) 1993,1995 Paul Kranenburg @@ -434,12 +434,6 @@ buildhints(void) goto out; } - /* Install it */ - if (unlink(_PATH_LD_HINTS) != 0 && errno != ENOENT) { - warn("%s", _PATH_LD_HINTS); - goto out; - } - if (rename(tmpfilenam, _PATH_LD_HINTS) != 0) { warn("%s", _PATH_LD_HINTS); goto out; |