Date: Wed, 26 Aug 2009 09:56:50 -0400 From: bert wiley <bertwiley@gmail.com> To: freebsd-hackers@freebsd.org Subject: Need some help understanding a jail system call. Message-ID: <9527461a0908260656w570f6cdha72e92b267e5354f@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello I found this code under a project called jailNG which has some system calls for doing jail stuff. Im still new to freebsd and im stumped on what this code is actually doing. In the source from the project there are few function calls that look like it creates and access the jail layer. Here is an example #define JAIL_CREATE 1 #define JAIL_DESTROY 2 #define JAIL_JOIN 3 extern char *environ[]; static void usage(void) { fprintf(stderr, "usage:\n"); fprintf(stderr, " jailctl create [jailname]\n"); fprintf(stderr, " jailctl destroy [jailname]\n"); fprintf(stderr, " jailctl join [jailname] [-c chrootpath] [path] " "[cmd] [args...]\n"); exit(-1); } static int jail_create(int argc, char *argv[]) { int error; if (argc < 2) usage(); error = syscall(375, JAIL_CREATE, argv[1]); if (error) perror("jailconf().create"); return (error); } No where in the code do i ever see any access to the jail.h type systems calls, so does the syscall(375, JAIL_CREATE, argv[1]); actually access the jail subsystem and create a jail? Here is the link i used to find this code http://www.watson.org/~robert/freebsd/jailng/ Any help on this question is appreciated thanks.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9527461a0908260656w570f6cdha72e92b267e5354f>