[uClibc-cvs] uClibc/ldso/util ldd.c,1.32,1.33
Erik Andersen
andersen at uclibc.org
Wed Jul 2 17:04:12 UTC 2003
Update of /var/cvs/uClibc/ldso/util
In directory winder:/tmp/cvs-serv11756
Modified Files:
ldd.c
Log Message:
Only exec child apps if they are elf type ET_EXEC
Index: ldd.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/util/ldd.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ldd.c 16 Jun 2003 07:34:25 -0000 1.32
+++ ldd.c 2 Jul 2003 17:04:08 -0000 1.33
@@ -535,7 +535,8 @@
interp = find_elf_interpreter(ehdr);
#ifdef __LDSO_LDD_SUPPORT
- if (interp && ehdr->e_ident[EI_CLASS] == ELFCLASSM && ehdr->e_ident[EI_DATA] == ELFDATAM
+ if (interp && ehdr->e_type == ET_EXEC && ehdr->e_ident[EI_CLASS] == ELFCLASSM &&
+ ehdr->e_ident[EI_DATA] == ELFDATAM
&& ehdr->e_ident[EI_VERSION] == EV_CURRENT && MATCH_MACHINE(ehdr->e_machine))
{
struct stat statbuf;
@@ -558,7 +559,7 @@
/* Wait till it returns */
waitpid(pid, &status, 0);
- if (WIFEXITED(status)!=0xdead) {
+ if (WIFEXITED(status) && WEXITSTATUS(status)==0) {
return 1;
}
More information about the uClibc-cvs
mailing list