Re: Patch for sandbox...

On Wed, 2006-09-20 at 01:41 -0400, R. Douglas Barbieri wrote:
> Hi all,
> I have a need to make pango work in a sandbox under Linux. The Win32
> port seems to handle it just fine, but not the Linux port (as
> evidenced in pango-utils.c pango_get_lib_subdirectory() and
> pango_get_sysconf_subdirectory() ).
> Anyway, I created a patch to make pango try to get the sysconfdir and
> the libdir from the environment instead of the SYSCONFDIR and LIBDIR
> definitions set at compile time. I've attached said patch.
> The environment variables are PANGO_SYSCONFDIR and PANGO_LIBDIR
> respectively. If they do not exist in the environment, the library
> will fall back to the compile-time definitions.

Note that pango_get_lib_subdirectory() is only used on win32 in Pango
source code.  pango_get_sysconf_subdirectory() is used to
read /etc/pango/pangorc, but also note that you can override all
settings provided there by setting the env var PANGO_RC_FILE.

I really don't feel like making pango scan two env vars for no good
reason.  Like Tor suggested already, chroot is the Unix way of doing
sandboxes.  Most software on a GNU/Linux system is not relocatable at
run time.

> Let me know if this works or not for you guys.
> Thanks!


"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]