clone 516294 -1
reassign -1 linux-libc-dev
found -1 linux-libc-dev/2.6.32-10
tags -1 = patch
retitle -1 linux-libc-dev: <linux/resource.h> getrusage() prototype should be
protected from user space
severity -1 normal
thanks
Hi,
with 1.5.17 you chose to make /usr/lib/klibc/include/linux a symbolic
link… congratulations, you just made the situation worse.
I tried to fix it with the following approach:
• on build time, replace the 「#include <linux/resource.h>」 with
the actual file, sans the bogus prototype
• add the correct prototype below
Of course, this now breaks if <linux/resource.h> is included by a
programme before <sys/resource.h>:
│In file included from
/tmp/buildd/klibc-1.5.17/usr/klibc/../include/sys/wait.h:11,
│ from usr/klibc/wait.c:7:
│/tmp/buildd/klibc-1.5.17/usr/klibc/../include/sys/resource.h:15: error:
conflicting types for 'getrusage'
│/tmp/buildd/klibc-1.5.17/linux/include/linux/resource.h:73: note: previous
declaration of 'getrusage' was here
│make[4]: *** [usr/klibc/wait.o] Error 1
Of course, the *correct* fix would be to protect the prototype,
for example like this:
--- /usr/include/linux/resource.h 2010-03-17 20:44:47.000000000 +0000
+++ resource.h 2010-03-25 11:24:43.000000000 +0000
@@ -70,6 +70,8 @@ struct rlimit {
*/
#include <asm/resource.h>
+#ifdef __KERNEL__
int getrusage(struct task_struct *p, int who, struct rusage *ru);
+#endif
#endif
This is why I split the bug.
(In case someone wonders, my goal is still to build mksh with klibc;
I have both static and shared, both -DMKSH_SMALL and full-featured
(almost) versions working with a patched 1.5.15 version… maybe we
could even replace klibc’s ash with it, after all Android has done
the same recently and mksh’s not much bigger but much better.)
bye,
//mirabilos
--
«MyISAM tables -will- get corrupted eventually. This is a fact of life. »
“mysql is about as much database as ms access” – “MSSQL at least descends
from a database” “it's a rebranded SyBase” “MySQL however was born from a
flatfile and went downhill from there” – “at least jetDB doesn’t claim to
be a database” (#nosec) ‣‣‣ Please let MySQL and MariaDB finally die!
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]