Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2017 03:01:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 218154] Cannot use [bcdef] characters at escape sequence of jail.conf(5)
Message-ID:  <bug-218154-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218154

            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@FreeBSD.org
          Reporter: mkonishi@sea.plala.or.jp

Created attachment 181220
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D181220&action=
=3Dedit
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] >=3D '0' && s[1] <=3D '9')
        *d =3D *++s - '0';
else if (s[1] >=3D 'A' && s[1] <=3D 'F')
        *d =3D *++s + (0xA - 'A');
else if (s[1] >=3D 'a' && s[1] <=3D 'a')
                                ~~~  oops...
        *d =3D *++s + (0xa - 'a');

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



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