| Summary: | Cannot use [bcdef] characters at escape sequence of jail.conf(5) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Masahiro Konishi <kakkoko> | ||||||
| Component: | bin | Assignee: | Jamie Gritton <jamie> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Some People | CC: | jamie, kevans | ||||||
| Priority: | --- | Keywords: | patch | ||||||
| Version: | 11.0-RELEASE | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
Created attachment 181221 [details]
patch to usr.sbin/jail/jaillex.l
I don't think this one needs a lot of discussion :-). I'll close it as soon as the MFCs are in. A commit references this bug: Author: jamie Date: Mon Mar 27 13:27:39 UTC 2017 New revision: 316022 URL: https://svnweb.freebsd.org/changeset/base/316022 Log: Fix hexadecimal escape codes in jail.conf(5). PR: 218154 Submitted by: Masahiro Konishi <mkonishi@sea.plala.or.jp> MFC after: 3 days Changes: head/usr.sbin/jail/jaillex.l (In reply to commit-hook from comment #3) Hi, I believe https://svnweb.freebsd.org/base/head/usr.sbin/jail/jaillex.l?view=markup&pathrev=316022#l219 should have had 'f' instead of 'F'? Indeed it should - I was too quick to put it in. (In reply to Jamie Gritton from comment #5) =) Cheers! A commit references this bug: Author: jamie Date: Thu Mar 30 01:37:34 UTC 2017 New revision: 316192 URL: https://svnweb.freebsd.org/changeset/base/316192 Log: MFC r316022,r316023: Fix hexadecimal escape codes in jail.conf(5). PR: 218154 Submitted by: Masahiro Konishi <mkonishi@sea.plala.or.jp> Changes: _U stable/11/ stable/11/usr.sbin/jail/jaillex.l A commit references this bug: Author: jamie Date: Thu Mar 30 01:37:37 UTC 2017 New revision: 316193 URL: https://svnweb.freebsd.org/changeset/base/316193 Log: MFC r316022,r316023: Fix hexadecimal escape codes in jail.conf(5). PR: 218154 Submitted by: Masahiro Konishi <mkonishi@sea.plala.or.jp> Changes: _U stable/10/ stable/10/usr.sbin/jail/jaillex.l |
Created attachment 181220 [details] patch to usr.sbin/jail/jaillex.l jail.conf(5) accepts escape sequence like "foo\x2Dbar" but you cannot use [bcdef] characters in it. It's easy to understand at usr.sbin/jail/jaillex.l: if (s[1] >= '0' && s[1] <= '9') *d = *++s - '0'; else if (s[1] >= 'A' && s[1] <= 'F') *d = *++s + (0xA - 'A'); else if (s[1] >= 'a' && s[1] <= 'a') ~~~ oops... *d = *++s + (0xa - 'a');