On Sun, Feb 13, 2011 at 8:27 AM, Eric <airu...@gmail.com> wrote:
> On Sat, Feb 12, 2011 at 9:49 PM, Philip Guenther <guent...@gmail.com>
wrote:
...
>> Regarding the latter: if you're intending that this should affect all
>> programs without any changes to the program themselves, then this will
>> require much care and verification that it doesn't bloat everything.
>> Consider that *every* C program on OpenBSD pulls in syslog_r() to
>> support the stack-protector check code.  If that starts pulling the
>> NIS code for getgrgid() to do the gid -> name mapping to find the
>> syslog socket, then many binaries will grow.  That code would _have_
>> to be excluded from the libc used in ramdisk builds!
>
> I can only think of two ways to avoid having NIS linked into everything:
>
> - Only use the modified syslog functions though LD_PRELOAD
>
> - Make openlog/syslog/closelog system calls (this would also allow
>  us to ensure the accuracy of the pid and program name strings, and
>  we could filter by program name in syslogd).

Yow!  Group names are strictly user-space right now; how exactly where
you planning on having the kernel get the group name for a process?

Backing up a step, syslog_r() MUST remain async-signal-safe, so
whatever designs you ponder, please check them against that
requirement.  That would be true even of an LD_PRELOAD replacement...



Philip Guenther

Reply via email to