aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@94c539fb-cf18-0410-b60f-edeeb537fa16>2006-12-01 18:24:57 +0000
committerjakub <jakub@94c539fb-cf18-0410-b60f-edeeb537fa16>2006-12-01 18:24:57 +0000
commit14ea05558ee0ed60d13e6681100c116e92593489 (patch)
treeb492f91a1eb882cdd2fdf49056187b71a25c349f
parent7e76c65050b8723f6aa66aad1b904a35d32001d7 (diff)
downloadprelink-cross-prelink_20061201.tar.gz
prelink-cross-prelink_20061201.tar.bz2
prelink-cross-prelink_20061201.zip
* src/verify.c (prelink_verify): Unlink ent->filename in case ofprelink_20061201
failures between closing the unprelinked dso and unlinking ent->filename. git-svn-id: http://sourceware.org/svn/prelink@151 94c539fb-cf18-0410-b60f-edeeb537fa16
-rw-r--r--trunk/ChangeLog6
-rw-r--r--trunk/src/verify.c12
2 files changed, 13 insertions, 5 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
index 2870c75..9e2961f 100644
--- a/trunk/ChangeLog
+++ b/trunk/ChangeLog
@@ -1,3 +1,9 @@
+2006-12-01 Jakub Jelinek <jakub@redhat.com>
+
+ * src/verify.c (prelink_verify): Unlink ent->filename in case of
+ failures between closing the unprelinked dso and unlinking
+ ent->filename.
+
2006-10-27 Jakub Jelinek <jakub@redhat.com>
* src/prelink.h (READWRITEPROTOSIZE): Undef after use.
diff --git a/trunk/src/verify.c b/trunk/src/verify.c
index 935cbc2..7945ced 100644
--- a/trunk/src/verify.c
+++ b/trunk/src/verify.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Red Hat, Inc.
+/* Copyright (C) 2002, 2003, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.
This program is free software; you can redistribute it and/or modify
@@ -289,17 +289,17 @@ prelink_verify (const char *filename)
dso2 = fdopen_dso (fd, filename);
if (dso2 == NULL)
- goto failure;
+ goto failure_unlink;
fd = -1;
if (prelink_prepare (dso2))
- goto failure;
+ goto failure_unlink;
if (ent->type == ET_DYN && relocate_dso (dso2, base))
- goto failure;
+ goto failure_unlink;
if (prelink (dso2, ent))
- goto failure;
+ goto failure_unlink;
unlink (ent->filename);
@@ -414,6 +414,8 @@ prelink_verify (const char *filename)
close (fdundone);
return 0;
+failure_unlink:
+ unlink (ent->filename);
failure:
if (fd != -1)
close (fd);