lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200803060001.38432.paplociennik@gmail.com>
Date:	Thu, 6 Mar 2008 00:01:38 -0500
From:	Pawel Plociennik <paplociennik@...il.com>
To:	Pavel Machek <pavel@....cz>, linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.24] chroot= as a new kernel parameter

Hi Andrew and other *real* hackers,

I have sent a *last* version of a patch which it has added a new kernel parameter chroot=
It were discusioned a *long time* on a lkml so I hope that it will has been applied.

Thanks,
Pawel 

Acked-by: Pavel Machek <pavel@...e.cz>
Signed-off-by: Pawel Plociennik <paplociennik@...il.com>

---
diff -urp linux-2.6.24-orig/Documentation/kernel-parameters.txt linux-2.6.24/Documentation/kernel-parameters.txt
--- linux-2.6.24-orig/Documentation/kernel-parameters.txt       2008-02-25 20:53:26.000000000 -0500
+++ linux-2.6.24/Documentation/kernel-parameters.txt    2008-03-04 09:51:52.000000000 -0500
@@ -381,6 +381,8 @@ and is between 256 and 4096 characters. 
                        Value can be changed at runtime via
                                /selinux/checkreqprot.
        
+       chroot=         [KNL] change a root for init process.
+
        clock=          [BUGS=X86-32, HW] gettimeofday clocksource override.
                        [Deprecated]
                        Forces specified clocksource (if available) to be used
diff -urp linux-2.6.24-orig/init/main.c linux-2.6.24/init/main.c
--- linux-2.6.24-orig/init/main.c       2008-03-01 12:58:37.000000000 -0500
+++ linux-2.6.24/init/main.c    2008-03-05 15:08:20.000000000 -0500
@@ -755,8 +755,20 @@ static void __init do_pre_smp_initcalls(
                spawn_softlockup_task();
 }
 
+static void *chroot_str;
+static int __init chroot_setup(char *str)
+{
+       chroot_str = str;
+       return 1;
+}
+__setup("chroot=", chroot_setup);
+
 static void run_init_process(char *init_filename)
 {
+       if (chroot_str)
+               if (sys_chroot(chroot_str) < 0)
+                       panic("chroot=%s failed\n", chroot_str);
+
        argv_init[0] = init_filename;
        kernel_execve(init_filename, argv_init, envp_init);
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ