packages: util-linux/util-linux-diet.patch - fixed and improved mkostemp re...
sparky
sparky at pld-linux.org
Fri Feb 11 01:17:25 CET 2011
Author: sparky Date: Fri Feb 11 00:17:25 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- fixed and improved mkostemp replacement, still uses mktemp so it stinks
---- Files affected:
packages/util-linux:
util-linux-diet.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/util-linux/util-linux-diet.patch
diff -u packages/util-linux/util-linux-diet.patch:1.1 packages/util-linux/util-linux-diet.patch:1.2
--- packages/util-linux/util-linux-diet.patch:1.1 Thu Feb 10 23:44:39 2011
+++ packages/util-linux/util-linux-diet.patch Fri Feb 11 01:17:20 2011
@@ -106,14 +106,14 @@
if (rc <= 0)
return -errno;
-+#ifndef HAVE_MKOSTEMP
-+ if ( mktemp( n ) == NULL ) {
++#ifdef HAVE_MKOSTEMP
+ fd = mkostemp(n, flags | O_EXCL);
++#else
++ if ( mktemp(n) == NULL || n[0] == '\0' ) {
+ free(n);
+ return -errno;
+ }
-+ fd = open(n, flags | O_EXCL);
-+#else
- fd = mkostemp(n, flags | O_EXCL);
++ fd = open(n, flags | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+#endif
if (fd >= 0 && name)
*name = n;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/util-linux/util-linux-diet.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list