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

--- Comment #18 from Jim Long <[email protected]> ---
Gee, one other point I forgot to make is that the change from CSV to
newline-delimited only happens with 'jail -e ""'.  Use ANY other delimiter, and
jail(8)'s behavior is unchanged.  IMO, the "traditional" 'jail -e ""', i.e. an
empty-string delimited has no use-case that I can obviously discern.  It seems
unlikely that changing the behavior of ONLY the -e "" case is going to break
anyone's scripts.  Here's the old jail(8) with -e "".  It seems unparseable to
me, but my UNIX-Fu is, well ...

# jail.old -e '' | hexdump -Cv | less
00000000  6e 61 6d 65 3d 74 65 73  74 65 78 65 63 2e 73 74  |name=testexec.st|
00000010  61 72 74 3d 22 2f 62 69  6e 2f 73 68 20 2f 65 74  |art="/bin/sh /et|
00000020  63 2f 72 63 22 65 78 65  63 2e 73 74 6f 70 3d 22  |c/rc"exec.stop="|
00000030  2f 62 69 6e 2f 73 68 20  2f 65 74 63 2f 72 63 2e  |/bin/sh /etc/rc.|
00000050  6e 73 6f 6c 65 6c 6f 67  3d 2f 76 61 72 2f 6c 6f  |nsolelog=/var/lo|
00000060  67 2f 6a 61 69 6c 5f 74  65 73 74 2e 6c 6f 67 68  |g/jail_test.logh|
00000070  6f 73 74 2e 68 6f 73 74  6e 61 6d 65 3d 74 65 73  |ost.hostname=tes|
00000080  74 2e 65 78 61 6d 70 6c  65 2e 65 64 75 70 61 74  |t.example.edupat|
00000060  2f 6c 6f 67 2f 6a 61 69  6c 5f 74 65 73 74 2e 6c  |/log/jail_test.l|
00000070  6f 67 0a 68 6f 73 74 2e  68 6f 73 74 6e 61 6d 65  |og.host.hostname|
00000080  3d 74 65 73 74 2e 65 78  61 6d 70 6c 65 2e 65 64  |=test.example.ed|
00000050  6e 73 6f 6c 65 6c 6f 67  3d 2f 76 61 72 2f 6c 6f  |nsolelog=/var/lo|
00000060  67 2f 6a 61 69 6c 5f 74  65 73 74 2e 6c 6f 67 68  |g/jail_test.logh|
00000070  6f 73 74 2e 68 6f 73 74  6e 61 6d 65 3d 74 65 73  |ost.hostname=tes|
00000080  74 2e 65 78 61 6d 70 6c  65 2e 65 64 75 70 61 74  |t.example.edupat|
00000090  68 3d 2f 6a 61 69 6c 2f  74 65 73 74 69 6e 74 65  |h=/jail/testinte|
000000a0  72 66 61 63 65 3d 70 75  62 6c 69 63 6c 69 6e 75  |rface=publiclinu|
000000b0  78 2e 6f 73 6e 61 6d 65  3d 22 5c 5c 42 61 63 6b  |x.osname="\\Back|
000000c0  73 6c 61 73 68 5c 5c 20  69 6e 20 4f 53 20 6e 61  |slash\\ in OS na|
000000d0  6d 65 20 23 20 70 69 70  65 3d 3e 7c 20 4a 69 6d  |me # pipe=>| Jim|
000000e0  27 73 20 74 6f 72 74 75  72 65 20 74 65 73 74 0a  |'s torture test.|
000000f0  77 69 74 68 20 6e 65 77  6c 69 6e 65 73 2c 20 73  |with newlines, s|
00000100  70 61 63 65 73 2c 09 75  6e 6d 61 74 63 68 65 64  |paces,.unmatched|
00000110  09 5c 22 71 75 6f 74 65  73 09 61 6e 64 09 74 61  |.\"quotes.and.ta|
00000120  62 73 2e 22 6d 6f 75 6e  74 2e 64 65 76 66 73 69  |bs."mount.devfsi|
00000130  70 34 2e 61 64 64 72 3d  76 6c 61 6e 33 7c 31 39  |p4.addr=vlan3|19|
00000140  32 2e 31 36 38 2e 31 2e  35 30 2f 33 32 2c 70 72  |2.168.1.50/32,pr|
00000150  69 76 61 74 65 7c 31 39  32 2e 31 36 38 2e 31 2e  |ivate|192.168.1.|
00000160  39 35 2d 39 39 2f 33 32  2c 31 37 32 2e 31 36 2e  |95-99/32,172.16.|
00000170  31 2e 39 35 2f 33 32 61  6c 6c 6f 77 2e 72 61 77  |1.95/32allow.raw|
00000180  5f 73 6f 63 6b 65 74 73  3d 31 6d 6f 75 6e 74 3d  |_sockets=1mount=|
00000190  27 2f 66 69 6c 65 73 79  73 74 65 6d 2d 61 09 22  |'/filesystem-a."|
000001a0  24 70 61 74 68 2f 6d 6e  74 2f 70 61 74 68 20 77  |$path/mnt/path w|
000001b0  69 74 68 20 73 70 61 63  65 73 22 09 6e 75 6c 6c  |ith spaces".null|
000001c0  66 73 09 72 6f 09 30 09  30 27 2c 22 2f 66 69 6c  |fs.ro.0.0',"/fil|
000001d0  65 73 79 73 74 65 6d 2d  62 09 24 70 61 74 68 2f  |esystem-b.$path/|
000001e0  6d 6e 74 2f 62 09 09 09  6e 75 6c 6c 66 73 09 72  |mnt/b...nullfs.r|
000001f0  6f 09 30 09 30 22 2c 27  2f 66 69 6c 65 73 79 73  |o.0.0",'/filesys|
00000200  74 65 6d 2d 63 09 22 24  70 61 74 68 2f 6d 6e 74  |tem-c."$path/mnt|
00000210  2f 70 61 74 68 09 77 69  74 68 09 74 61 62 73 22  |/path.with.tabs"|
00000220  09 09 09 6e 75 6c 6c 66  73 09 72 6f 09 30 09 30  |...nullfs.ro.0.0|
00000230  27 2c 22 2f 66 69 6c 65  73 79 73 74 65 6d 2d 64  |',"/filesystem-d|
00000240  09 24 70 61 74 68 2f 6d  6e 74 2f 64 09 09 09 6e  |.$path/mnt/d...n|
00000250  75 6c 6c 66 73 09 72 6f  09 30 09 30 22 2c 22 2f  |ullfs.ro.0.0","/|
00000260  66 69 6c 65 73 79 73 74  65 6d 2d 65 09 24 70 61  |filesystem-e.$pa|
00000270  74 68 2f 6d 6e 74 2f 65  09 09 09 6e 75 6c 6c 66  |th/mnt/e...nullf|
00000280  73 09 72 6f 09 30 09 30  22 0a                    |s.ro.0.0".      |
0000028A  

The above formatting is the only behavior that we lose from this patch.  All
other use-cases of jail(8) will be unaffected by the change.

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

Reply via email to