This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [BZ #18433] Check file access/existence before forking.


On 10/09/15 15:47, Navid Rahimi wrote:
[BZ #18433]
* sysdeps/posix/spawni.c (__spawni):
Check file access before forking.
---

+++ b/sysdeps/posix/spawni.c
@@ -90,6 +90,9 @@ __spawni (pid_t *pid, const char *file,
     size_t len;
     size_t pathlen;

+  if(__access (file, X_OK) != 0)
+    return errno;
+

this does not guarantee the success of __execve (file, argv, envp).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]