Issue with jk_update - 2.21

Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with jk_update - 2.21

Tahder Xunil
Hi,

Got an issue with jk_update using the latest version 2.21
jk_update -j /home/students -d
Traceback (most recent call last):
  File "/sbin/jk_update", line 290, in <module>
    main()
  File "/sbin/jk_update", line 272, in main
    if (not config.has_key('hardlink')):
AttributeError: 'dict' object has no attribute 'has_key'

Any hint what to do next with this? Currently working in Centos 8, using python3.
Thanks.


Initial got an issue but this is resolved by deleting one of the line/comment in includesections
jk_init  -v -j /home/students basicshell
Traceback (most recent call last):
  File "/sbin/jk_init", line 261, in <module>
    main()
  File "/sbin/jk_init", line 258, in main
    activateConfig(config, jail, args)
  File "/sbin/jk_init", line 164, in activateConfig
    cfg.read([config['file']])
  File "/usr/lib64/python3.6/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib64/python3.6/configparser.py", line 1092, in _read
    fpname, lineno)
configparser.DuplicateOptionError: While reading from '/etc/jailkit/jk_init.ini' [line 118]: option 'includesections' in section 'openvpn' already exists

Solution:
[openvpn]
comment = jail for the openvpn daemon
paths = /usr/sbin/openvpn
users = root,nobody
groups = root,nogroup
#includesections = netbasics
devices = /dev/urandom, /dev/random, /dev/net/tun
includesections = netbasics, uidbasics
need_logsocket = 1


_______________________________________________
Jailkit-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/jailkit-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue with jk_update - 2.21

Olivier Sessink-2
On 10-01-2020 05:50, Tahder Xunil wrote:
Hi,

Got an issue with jk_update using the latest version 2.21
jk_update -j /home/students -d
Traceback (most recent call last):
  File "/sbin/jk_update", line 290, in <module>
    main()
  File "/sbin/jk_update", line 272, in main
    if (not config.has_key('hardlink')):
AttributeError: 'dict' object has no attribute 'has_key'

Any hint what to do next with this? Currently working in Centos 8, using python3.

whoops that is python2 code that has not been migrated.

it is fixed now in CVS, see https://cvs.savannah.nongnu.org/viewvc/jailkit/jailkit/py/

I will do a new release soon.


Initial got an issue but this is resolved by deleting one of the line/comment in includesections
jk_init  -v -j /home/students basicshell
Traceback (most recent call last):
  File "/sbin/jk_init", line 261, in <module>
    main()
  File "/sbin/jk_init", line 258, in main
    activateConfig(config, jail, args)
  File "/sbin/jk_init", line 164, in activateConfig
    cfg.read([config['file']])
  File "/usr/lib64/python3.6/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib64/python3.6/configparser.py", line 1092, in _read
    fpname, lineno)
configparser.DuplicateOptionError: While reading from '/etc/jailkit/jk_init.ini' [line 118]: option 'includesections' in section 'openvpn' already exists

Solution:
[openvpn]
comment = jail for the openvpn daemon
paths = /usr/sbin/openvpn
users = root,nobody
groups = root,nogroup
#includesections = netbasics
devices = /dev/urandom, /dev/random, /dev/net/tun
includesections = netbasics, uidbasics
need_logsocket = 1


thanks for reporting, this one was fixed in CVS already, but it was so minor that I did not make a new release.

Olivier

-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/

_______________________________________________
Jailkit-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/jailkit-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue with jk_update - 2.21

Tahder Xunil
Thanks much for the update and seems working fine now except the ERROR of not finding the lib and opt folders, however, can be resolved by manually creating the said directories.

jk_update -j /home/students -d
ERROR:  while scanning dir /home/students/lib/: No such file or directory
ERROR:  while scanning dir /home/students/opt/: No such file or directory

On Fri, Jan 10, 2020 at 8:27 PM Olivier Sessink <[hidden email]> wrote:
On 10-01-2020 05:50, Tahder Xunil wrote:
Hi,

Got an issue with jk_update using the latest version 2.21
jk_update -j /home/students -d
Traceback (most recent call last):
  File "/sbin/jk_update", line 290, in <module>
    main()
  File "/sbin/jk_update", line 272, in main
    if (not config.has_key('hardlink')):
AttributeError: 'dict' object has no attribute 'has_key'

Any hint what to do next with this? Currently working in Centos 8, using python3.

whoops that is python2 code that has not been migrated.

it is fixed now in CVS, see https://cvs.savannah.nongnu.org/viewvc/jailkit/jailkit/py/

I will do a new release soon.


Initial got an issue but this is resolved by deleting one of the line/comment in includesections
jk_init  -v -j /home/students basicshell
Traceback (most recent call last):
  File "/sbin/jk_init", line 261, in <module>
    main()
  File "/sbin/jk_init", line 258, in main
    activateConfig(config, jail, args)
  File "/sbin/jk_init", line 164, in activateConfig
    cfg.read([config['file']])
  File "/usr/lib64/python3.6/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib64/python3.6/configparser.py", line 1092, in _read
    fpname, lineno)
configparser.DuplicateOptionError: While reading from '/etc/jailkit/jk_init.ini' [line 118]: option 'includesections' in section 'openvpn' already exists

Solution:
[openvpn]
comment = jail for the openvpn daemon
paths = /usr/sbin/openvpn
users = root,nobody
groups = root,nogroup
#includesections = netbasics
devices = /dev/urandom, /dev/random, /dev/net/tun
includesections = netbasics, uidbasics
need_logsocket = 1


thanks for reporting, this one was fixed in CVS already, but it was so minor that I did not make a new release.

Olivier

-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
_______________________________________________
Jailkit-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/jailkit-dev

_______________________________________________
Jailkit-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/jailkit-dev