2 Replies
      Latest reply on Mar 4, 2020 1:29 AM by vishalps
      vishalps Level 1 Level 1 (0 points)

        Hi,

        We have a scenario where we take backups of a file. User can select the version to restore from.

        We have a kernel extension which while restoring the file, restores all the file attributes.

         

        Code looks like this

         

            struct vnode_attr va;

            VATTR_INIT(&va);

            SET_VATTR_IF_SUPPORTED(&va, vaFrom, vaDestination, va_change_time);

           ... other attributes

           vnode_setattr(vnode, &vaDestination, context);

         

        This used to work upto macOS 10.13.

        On macOS 10.14 onwords, change_time is not set to the given value but to the current timestamp.

         

        Is this expected behavior? Is there any documetation around this?

        The reason we restore all attributes is so that other backup softwares don't think that the file was modified.