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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to