On Tuesday May 22 2007 09:14:35 pm Dan Nicholson wrote: > The fedora patch does one thing I'm really not fond of. It adds a > static version of linux/capability.h into sys/capability.h instead of > #include <linux/capability.h>. I'd much rather just use the sanitized > one from the kernel so long as it works (which it appears to do).
That's the first thing I noticed too. It looks like sys/capability.h does need to be patched to prevent linux/capability.h from including linux/types.h, and asm/types.h, and other kernel headers which will end up giving us a compiler error. sys/capability.h should be using libc's types.h if possible, but I'm not seeing an elegant way of preventing linux/capability.h from including linux/types.h without defining our own types in sys/capability.h > Besides that, though, most of the changes are just to make the build > better. This is where I got my "the minimal thing to do is remove the > two _sycall2 declarations". The barest minimum to get libcap to compile is fixing the _syscalls. Both Owl and Fedora simply don't compile libcap/cap_sys.c. Owl removes it from the Makefile, Fedora comments out the source. It's the same thing.. but, this may be a Glibc specific fix. I want to check if uClibc includes capget/capset, and if not then wrap them in '#ifndef __Glibc__' instead of commenting it out. Gentoo supports uClibc and Dietlibc, so I'd like to see what they have done here. The snprintf bounds checking are sane, and are portable to bsd/libc5. This could be offered in a separate patch, but the "dont fix it if its not broken" logic goes against the spirit of what Libcap is for. Fixing the gcc4 warnings would be good too. I don't want to rush this, and for the sake of good documentation, and justification, each line of the patch should have a good reason so everyone is happy with it. robert
pgp9oPLtnI8Ae.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
