0xGA: Check-in [17e12c7aac]

Yet another PHP framework, but made for org-mode and geeks.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:No more chroot, use LXC instead
Timelines: family | ancestors | descendants | both | narv
Files: files | file ages | folders
SHA1:17e12c7aacbb4ac17d868f045357c1f16d251d7c
User & Date: milouse 2014-12-30 11:19:19
Context
2014-12-30
11:23
Update narv installer check-in: 4138c08171 user: milouse tags: narv
11:19
No more chroot, use LXC instead check-in: 17e12c7aac user: milouse tags: narv
2014-12-29
19:41
Fix little glitches check-in: 1fdf461cf7 user: milouse tags: narv
Changes

Changes to src/narv.py.

601
602
603
604
605
606
607




608
609
610
611
612
613
614
        signal.signal(signal.SIGUSR1, self.interrupt)

        self.server = NarvThreadedServer(server_infos, request_handler)
        server_thread = threading.Thread(target=self.server.serve_forever)
        server_thread.daemon = True
        server_thread.start()





        if os.getuid() == 0:
            os.chroot(narv_root_path)
            os.chdir("/")
            logging.debug("Dropping priviledges to UID {0} GID {1}".format('nobody', 'nobody'))

            # Remove group privileges
            os.setgroups([])







>
>
>
>







601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
        signal.signal(signal.SIGUSR1, self.interrupt)

        self.server = NarvThreadedServer(server_infos, request_handler)
        server_thread = threading.Thread(target=self.server.serve_forever)
        server_thread.daemon = True
        server_thread.start()

        os.chdir(narv_root_path)
        return

        # No more chroot... USE LXC or other containers Stuff !
        if os.getuid() == 0:
            os.chroot(narv_root_path)
            os.chdir("/")
            logging.debug("Dropping priviledges to UID {0} GID {1}".format('nobody', 'nobody'))

            # Remove group privileges
            os.setgroups([])