[Top][All Lists]
[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
- Re: chroot/setuid for lilypond (for LSR), (continued)
Re: chroot/setuid for lilypond (for LSR), Han-Wen Nienhuys, 2005/03/04
- Re: chroot/setuid for lilypond (for LSR), Sebastiano Vigna, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR), Jan Nieuwenhuizen, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR),
Han-Wen Nienhuys <=
- Re: chroot/setuid for lilypond (for LSR), Sebastiano Vigna, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR), Sebastiano Vigna, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR), Han-Wen Nienhuys, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR), Sebastiano Vigna, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR), Han-Wen Nienhuys, 2005/03/05
- Re: chroot/setuid for lilypond (for LSR), Han-Wen Nienhuys, 2005/03/06
- Re: chroot/setuid for lilypond (for LSR), Sebastiano Vigna, 2005/03/06