patch-lib_fileutils_c 531 B

1234567891011121314
  1. --- util-linux-2.23.2.orig/lib/fileutils.c 2013-06-13 09:46:10.000000000 +0200
  2. +++ util-linux-2.23.2/lib/fileutils.c 2013-08-14 11:58:47.000000000 +0200
  3. @@ -37,7 +37,11 @@ int xmkstemp(char **tmpname, char *dir)
  4. xasprintf(&localtmp, "%s/%s.XXXXXX", _PATH_TMP,
  5. program_invocation_short_name);
  6. old_mode = umask(077);
  7. +#if defined(__GLIBC__) && !defined(__UCLIBC__)
  8. fd = mkostemp(localtmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);
  9. +#else
  10. + fd = mkstemp(localtmp);
  11. +#endif
  12. umask(old_mode);
  13. if (fd == -1) {
  14. free(localtmp);