lilypond-devel
[Top][All Lists]
Advanced

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

Re: chroot/setuid for lilypond (for LSR)


From: Han-Wen Nienhuys
Subject: Re: chroot/setuid for lilypond (for LSR)
Date: Sat, 5 Mar 2005 12:09:45 +0100

address@hidden writes:
> +do_chroot_jail ()
> +{
> +  /* Now we chroot, setuid/setgrp and chdir. If something goes wrong, we 
> exit (this is a
> +     security-sensitive area). First we split jail_spec into its components, 
> then we
> +     retrieve the user/group id (necessarily *before* chroot'ing!) and 
> finally we perform
> +     the actual actions. */
> +
> +  char *jail_spec_writable = (char *)malloc (strlen (jail_spec) + 1);
> +  strcpy(jail_spec_writable, jail_spec);

Following up on Jan, this would be strdup(jail_spec), but can you
use our String library? It's immune to all kinds of coding errors
with indices and memory management. 
 

-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]