[Bug 218154] Cannot use [bcdef] characters at escape sequence of jail.conf(5)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Mar 27 03:01:31 UTC 2017


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

            Bug ID: 218154
           Summary: Cannot use [bcdef] characters at escape sequence of
                    jail.conf(5)
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: mkonishi at sea.plala.or.jp

Created attachment 181220
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=181220&action=edit
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');

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


More information about the freebsd-bugs mailing list