aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/xf86-video-virtualbox/uclibc-spawn.patch
blob: 98b4e8ad6e112322375295897e850a006a528e86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- ./src/VBox/Runtime/r3/posix/process-creation-posix.cpp.orig
+++ ./src/VBox/Runtime/r3/posix/process-creation-posix.cpp
@@ -48,6 +48,9 @@
  * whether it is started detached or not. */
 # define HAVE_POSIX_SPAWN 1
 #endif
+#if defined(__UCLIBC__)
+#undef HAVE_POSIX_SPAWN
+#endif
 #ifdef HAVE_POSIX_SPAWN
 # include <spawn.h>
 #endif
@@ -103,11 +106,9 @@
     if (spwd)
         pw->pw_passwd = spwd->sp_pwdp;
 
-    /* be reentrant */
-    struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data));
-    char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data);
+    /* NOT reentrant */
+    char *pszEncPasswd = crypt(pszPasswd, pw->pw_passwd);
     int fCorrect = !strcmp(pszEncPasswd, pw->pw_passwd);
-    RTMemTmpFree(data);
     if (!fCorrect)
         return VERR_PERMISSION_DENIED;