Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2235

'=' is not permitted in modes, but probably should be

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.9.0
    • Component/s: Promise type: files
    • Labels:
      None
    • Platform:
      N/A
    • Steps to reproduce:
      Manual steps provided

      Description

      The mode parsing code can handle '=', e.g. "u=rwx", but the range regular expression on the modes field does not permit it.

      Example policy

      <pre>
      bundle agent test
      {
      files:
      "/test"
      perms => test_perms;
      }

      body perms test_perms
      {
      mode => "u=rwx";
      }

      </pre>

      Steps to reproduce

      Run the above policy

      What I expected to happen

      CFEngine to try to set the permissions u=rwx on the file /test

      What happened instead

      <pre>
      ./test-range.cf:10:17: error: Scalar value is out of range
      mode => "u=rwx";
      ^
      error: There are syntax errors in policy files
      error: Policy failed validation with command '"/var/cfengine/bin/cf-promises" -c "./test-range.cf"'
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              zofrex James Sanderson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel