[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Jailkit-dev] [bug #30744] jk_init fails throws exception when run first
From: |
Sebastian Reitenbach |
Subject: |
[Jailkit-dev] [bug #30744] jk_init fails throws exception when run first to create a chroot environment |
Date: |
Wed, 11 Aug 2010 09:26:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.5.11-0.1.1 Firefox/3.5.11 |
URL:
<http://savannah.nongnu.org/bugs/?30744>
Summary: jk_init fails throws exception when run first to
create a chroot environment
Project: Jailkit
Submitted by: buzzdee
Submitted on: Wed 11 Aug 2010 09:26:36 AM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
running jk_init at the first time throws below exception:
$ sudo jk_init -j /home/testjail2 jk_lsh -f
ERROR: cannot lstat() /home/testjail2
/home
Creating jail /home/testjail2
Traceback (most recent call last):
File "/usr/local/sbin/jk_init", line 246, in <module>
main()
File "/usr/local/sbin/jk_init", line 243, in main
activateConfig(config, jail, args)
File "/usr/local/sbin/jk_init", line 163, in activateConfig
ji.handle_cfg_section(config,jail,cfg,section)
File "/usr/local/sbin/jk_init", line 98, in handle_cfg_section
self.handle_cfg_section(config,chroot,cfg,tmp)
File "/usr/local/sbin/jk_init", line 133, in handle_cfg_section
jk_lib.init_passwd_and_group(chroot,users,groups,config['verbose'])
File "/usr/local/share/jailkit/jk_lib.py", line 738, in
init_passwd_and_group
create_parent_path(chroot,'/etc/', be_verbose, copy_permissions=0,
allow_suid=0, copy_ownership=0)
File "/usr/local/share/jailkit/jk_lib.py", line 445, in create_parent_path
os.mkdir(jailpath, 0755)
OSError: [Errno 17] File exists: '/home/testjail2/etc/'
running it a second time, it works as expected.
Appended patch fixes the problem for me. However, I'm not perfectly sure
whether this is the right way to fix it.
I ran into the same problem on SLES 11 and OpenBSD.
patch is against jailkit-2.11
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 11 Aug 2010 09:26:36 AM GMT Name: patch-py_jk_lib_py Size: 631B
By: buzzdee
<http://savannah.nongnu.org/bugs/download.php?file_id=21187>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?30744>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Jailkit-dev] [bug #30744] jk_init fails throws exception when run first to create a chroot environment,
Sebastian Reitenbach <=