Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Aug 2018 19:56:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 230487] jail -m works incorrectly in some cases
Message-ID:  <bug-230487-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230487

            Bug ID: 230487
           Summary: jail -m works incorrectly in some cases
           Product: Base System
           Version: 11.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: jasonmader@gmail.com

It looks like a `jail -m` is not correctly handling jail.conf and then sets
incorrect values to a running jail. Example, here the `php` jail is getting=
 the
wrong hostname, ip6 address, and devfs ruleset.

root# jls -a
   JID  IP Address      Hostname                      Path
     1                  localhost=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20
/zroot/webserver/jails/mysql
     8  129.174.130.141 www.ccsa.gmu.edu=20=20=20=20=20=20=20=20=20=20=20=
=20=20
/zroot/webserver/jails/php

root# jail -mv
mysql: jail_set(JAIL_UPDATE) jid=3D1 name=3Dmysql securelevel=3D2
host.hostname=3Dlocalhost devfs_ruleset=3D5
mysql: updated
php: jail_set(JAIL_UPDATE) jid=3D8 name=3Dphp securelevel=3D2 host.hostname=
=3D""
ip4.addr=3D129.174.130.141 ip6.addr=3D"" devfs_ruleset=3D0
php: updated

root# jls -a
   JID  IP Address      Hostname                      Path
     1                  localhost=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20
/zroot/webserver/jails/mysql
     8  129.174.130.141=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
/zroot/webserver/jails/php


/etc/jail.conf:
mysql {
        securelevel=3D2;
        host.hostname=3D"localhost";
        ip4 =3D disable;
        ip6 =3D disable;
        path =3D "/var/jails/mysql";
        devfs_ruleset=3D5;
        mount.devfs;
        exec.start =3D "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe
--user=3Dmysql --datadir=3D/var/db --pid-file=3D/var/run/mysql.pid
--explicit_defaults_for_timestamp=3Dtrue";
        exec.stop =3D "/bin/pkill -TERM -F /var/run/mysql.pid";
}
php {
        securelevel=3D2;
        host.hostname=3D"www.ccsa.gmu.edu";
        ip4.addr=3D129.174.130.141;
        ip6.addr=3D2620:10e:6024:f004::141;
        path =3D "/var/jails/php";
        devfs_ruleset=3D5;
        mount.devfs;
        mount.fstab =3D "/var/jails/php/etc/fstab";
        exec.start =3D "/usr/sbin/php-fpm";
        exec.stop =3D "/bin/pkill -QUIT -F /var/run/php-fpm.pid";
}

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230487-227>