another highly perversive scheme:
mounts ALTLinux etc under /mnt, then mounts /mnt/xxx.clp under /root, then mounts --move /mnt under /root/opt, then mounts --move / under /root -- someone, stop me
This commit is contained in:
parent
0be6937de0
commit
25f4ab2cc3
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
#define VERSION_FILE "/.VERSION"
|
#define VERSION_FILE "/.VERSION"
|
||||||
#define RAMDISK_LOCATION "/ALTLinux/base/"
|
#define RAMDISK_LOCATION "/ALTLinux/base/"
|
||||||
#define IMAGE_LOCATION "/mnt"
|
#define IMAGE_LOCATION "/opt"
|
||||||
#define STAGE2_LOCATION "/mnt"
|
#define STAGE2_LOCATION "/root"
|
||||||
#define LIVE_DEVICE "/dev/cloop"
|
#define LIVE_DEVICE "/dev/cloop"
|
||||||
#define STAGE2FS "romfs"
|
#define STAGE2FS "romfs"
|
||||||
#define LIVEFS "ext2"
|
#define LIVEFS "ext2"
|
||||||
|
3
init.c
3
init.c
@ -590,6 +590,9 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* Okay, I think we should be safe... */
|
/* Okay, I think we should be safe... */
|
||||||
|
|
||||||
|
if ( mount(IMAGE_LOCATION, "." IMAGE_LOCATION, NULL, MS_MOVE, NULL) )
|
||||||
|
fatal_error("overmounting image location");
|
||||||
|
|
||||||
umount("/sys");
|
umount("/sys");
|
||||||
umount("/proc");
|
umount("/proc");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user