mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
fix comments to be non-recursive
Signed-Off-By: Kees Cook <kees.cook@canonical.com>
This commit is contained in:
parent
627c044e4d
commit
c4c430dcd0
1 changed files with 19 additions and 20 deletions
|
@ -186,26 +186,25 @@ static pattern_t convert_aaregex_to_pcre(const char *aare, int anchor,
|
||||||
} else {
|
} else {
|
||||||
if ((dptr > pcre) && *(dptr - 1) == '/') {
|
if ((dptr > pcre) && *(dptr - 1) == '/') {
|
||||||
#if 0
|
#if 0
|
||||||
/* handle comment containing use
|
// handle comment containing use
|
||||||
* of C comment characters
|
// of C comment characters
|
||||||
* /* /*/ and /** to describe paths
|
// /* /*/ and /** to describe paths
|
||||||
*
|
//
|
||||||
* modify what is emitted for * and **
|
// modify what is emitted for * and **
|
||||||
* when used as the only path
|
// when used as the only path
|
||||||
* component
|
// component
|
||||||
* ex.
|
// ex.
|
||||||
* /* /*/ /**/ /**
|
// /* /*/ /**/ /**
|
||||||
* this prevents these expressions
|
// this prevents these expressions
|
||||||
* from matching directories or
|
// from matching directories or
|
||||||
* invalid paths
|
// invalid paths
|
||||||
* in these case * and ** must
|
// in these case * and ** must
|
||||||
* match at least 1 character to
|
// match at least 1 character to
|
||||||
* get a valid path element.
|
// get a valid path element.
|
||||||
* ex.
|
// ex.
|
||||||
* /foo/* -> should not match /foo/
|
// /foo/* -> should not match /foo/
|
||||||
* /foo/*bar -> should match /foo/bar
|
// /foo/*bar -> should match /foo/bar
|
||||||
* /*/foo -> should not match //foo
|
// /*/foo -> should not match //foo
|
||||||
*/
|
|
||||||
#endif
|
#endif
|
||||||
const char *s = sptr;
|
const char *s = sptr;
|
||||||
while (*s == '*')
|
while (*s == '*')
|
||||||
|
|
Loading…
Add table
Reference in a new issue