openbsd-ports/security/jailkit/patches/patch-py_jk_lib_py
gonzalo ec4d2f5082 Update for Jailkit to 2.16, bugfix release.
Ok sebastia@ (maintainer)
2013-04-24 12:47:39 +00:00

19 lines
690 B
Plaintext

$OpenBSD: patch-py_jk_lib_py,v 1.3 2013/04/24 12:47:39 gonzalo Exp $
Fix running jk_init trying to create a jail the first time
--- py/jk_lib.py.orig Thu Aug 2 14:55:28 2012
+++ py/jk_lib.py Tue Apr 23 06:35:23 2013
@@ -461,7 +461,10 @@ def create_parent_path(chroot,path,be_verbose=0, copy_
if (stat.S_ISDIR(sb.st_mode)):
if (be_verbose):
print 'Create directory '+jailpath
- os.mkdir(jailpath, 0755)
+ try:
+ os.mkdir(jailpath, 0755)
+ except OSError, (errno,strerror):
+ sys.stderr.write('NOTE: Jail directory already existed:\n')
if (copy_permissions):
try:
copy_time_and_permissions(origpath, jailpath, be_verbose, allow_suid, copy_ownership)