[sysvinit-devel] [PATCH 2/2] shutdown.c: Avoid symbol collision with warn()

2013-11-14 Thread Richard Tollerton
warn() is being exported as a dynamic symbol because it collides with warn(3), and cc presumes that we're overriding it. This could affect unexpectedly loaded shared libraries (e.g. NSS modules). To fix, rename the function. Signed-off-by: Richard Tollerton --- src/shutdown.c | 8 1 fil

[sysvinit-devel] [PATCH 1/2] shutdown.c: Avoid symbol collision with shutdown()

2013-11-14 Thread Richard Tollerton
shutdown() is being exported as a dynamic symbol because it collides with shutdown(2), and cc presumes that we're overriding that syscall. This can really screw up (and has really screwed up) NSS modules. To fix, rename the function. Signed-off-by: Richard Tollerton --- src/shutdown.c | 6 +++---

[sysvinit-devel] [PATCH 0/2] shutdown: Fix segfaults due to symbol collisions

2013-11-14 Thread Richard Tollerton
We have encountered some puzzling segfaults when calling the `shutdown` utility, which are ultimately caused by the specific *name* of a function in `shutdown`, *not* by any of its code. Specifically, if: 1. A third-party shared library is loaded along with the `shutdown` utility (e.g. a NSS m