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/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230487

            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                    
/zroot/webserver/jails/mysql
     8  129.174.130.141 www.ccsa.gmu.edu             
/zroot/webserver/jails/php

root# jail -mv
mysql: jail_set(JAIL_UPDATE) jid=1 name=mysql securelevel=2
host.hostname=localhost devfs_ruleset=5
mysql: updated
php: jail_set(JAIL_UPDATE) jid=8 name=php securelevel=2 host.hostname=""
ip4.addr=129.174.130.141 ip6.addr="" devfs_ruleset=0
php: updated

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


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

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

help

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