Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 176426 Details for
Bug 159556
sys-block/partimage: insecure temporary file creation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
final? fix for the mkstemp problem
partimage-mkstemp-fix-v3.patch (text/plain), 1.37 KB, created by
Matti Bickel (RETIRED)
on 2008-12-26 10:31:08 UTC
(
hide
)
Description:
final? fix for the mkstemp problem
Filename:
MIME Type:
Creator:
Matti Bickel (RETIRED)
Created:
2008-12-26 10:31:08 UTC
Size:
1.37 KB
patch
obsolete
>--- partimage-0.6.7/src/client/main.cpp 2008-02-03 22:58:00.000000000 +0100 >+++ partimage/src/client/main.cpp 2008-12-26 11:26:18.000000000 +0100 >@@ -837,15 +837,16 @@ > { > if ((fd_lock = mkstemp(finish_last_countfile_lock)) == -1) > { >- delete g_interface; >- fprintf(stderr, i18n("Error: Cannot create lock for countfile")); >- return EXIT_FAILURE; >- } >+ --nRetries; >+ sleep(2); >+ continue; >+ } > fLockFile = fdopen(fd_lock, "r"); > if (fLockFile == NULL) > { >- --nRetries; >- sleep(2); >+ close(fd_lock); >+ unlink(finish_last_countfile_lock); >+ sleep(2); > } > } while (fLockFile == NULL && nRetries); > if (!nRetries) >@@ -856,6 +857,10 @@ > } > if ((fd_countfile = mkstemp(finish_last_countfile)) == -1) > { >+ fclose(fLockFile); >+ close(fd_lock); >+ unlink(finish_last_countfile_lock); >+ > delete g_interface; > fprintf(stderr, i18n("Error: Cannot create countfile")); > return EXIT_FAILURE; >@@ -863,6 +868,12 @@ > fCountFile = fdopen(fd_countfile, "r"); > if (fCountFile == NULL) > { >+ fclose(fLockFile); >+ close(fd_lock); >+ close(fd_countfile); >+ unlink(finish_last_countfile_lock); >+ unlink(finish_last_countfile); >+ > delete g_interface; > fprintf(stderr, i18n("Error: Cannot count remaining partimages")); > return EXIT_SUCCESS;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 159556
:
113491
|
115523
| 176426