Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2022 08:30:31 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: how to restrict file access below some top directory
Message-ID:  <202202100830.21A8UVSP016362@critter.freebsd.dk>
In-Reply-To: <YgTL9tf0EaX3%2BD3Q@pureos>
References:  <YgTL9tf0EaX3%2BD3Q@pureos>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
Matthias Apitz writes:
> 
> Hello,
>
> I want restrict in a C- or Perl-written application the file access to
> only files below some top directory, say
>
> 	/var/spool/dir/
>
> and not allowing, for example, access to /var/spool/dir/../../../etc/passwd
> Ofc, this could be done easy with chroot(2), but this would require root
> permision. Any other ideas?

Jails.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202100830.21A8UVSP016362>