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

File integrity monitoring with changes body should work with symlinks correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Promise type: files
    • Labels:
      None
    • Platform:
      AIX, Linux

      Description

      On 3.7.1 when I use a changes body to do file integrity monitoring of a symlink I see changes on each agent execution even when no changes were made to the symlink itself, or its target.

      For example:
      <pre>
      [root@hub masterfiles]# cf-agent -KI
      error: Unexpected value type reading from database: 32765
      notice: Permissions for '/etc/symlink_to_real_file' changed 100600 ->
      120777
      notice: inode for '/etc/symlink_to_real_file' changed 136151 -> 136155
      notice: Permissions for '/etc/symlink_to_real_file' changed 120777 ->
      100600
      notice: inode for '/etc/symlink_to_real_file' changed 136155 -> 136151
      </pre>

      Here are the file stats for reference:

      For /etc/symlink_to_real_file
      <pre>
      [root@hub masterfiles]# stat /etc/symlink_to_real_file
      File: `/etc/symlink_to_real_file' -> `/etc/real_file'
      Size: 14 Blocks: 0 IO Block: 4096 symbolic link
      Device: fd00h/64768d Inode: 136155 Links: 1
      Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
      Access: 2015-11-04 19:47:54.900657104 +0000
      Modify: 2015-11-04 19:47:54.883648604 +0000
      Change: 2015-11-04 19:47:54.883648604 +0000
      </pre>

      For /etc/real_file (the target of /etc/symlink_to_real_file
      <pre>
      [root@hub masterfiles]# stat /etc/real_file
      File: `/etc/real_file'
      Size: 0 Blocks: 0 IO Block: 4096 regular empty file
      Device: fd00h/64768d Inode: 136151 Links: 1
      Access: (0600/rw------) Uid: ( 0/ root) Gid: ( 0/ root)
      Access: 2015-11-04 19:47:54.892653104 +0000
      Modify: 2015-11-04 19:47:54.877645604 +0000
      Change: 2015-11-04 19:47:54.877645604 +0000
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              a10003 Eystein Maloy Stenberg
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel