[OpenWrt-Devel] [PATCH procd] service: start apps with LD_PRELOAD & lib disabling buffering
Paul Fertser
fercerpav at gmail.com
Sat Jun 20 02:00:06 EDT 2015
Hey Rafał,
Rafał Miłecki <zajec5 at gmail.com> writes:
> + char ld_preload[64] = {}; /* Has to be big enough for all cases */
...
> + if (ld_preload[0])
> + strcat(ld_preload, ":");
> + strcat(ld_preload, "/lib/libpreload-seccomp.so");
I understand C is often like that but still using strcat here makes me
feel uneasy. Proper range-checking would require a bit more code, but
it's a one-time coding/reviewing and a neglectable runtime cost.
> +static void __attribute__((constructor)) setnbf(void)
> +{
> + setbuf(stdout, NULL);
> +}
Not sure if no buffering or line buffering would be the best choice
here.
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list