question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mac: Ensure that the kext blocks file I\O that that is not allowed when VFSForGit is unmounted

See original GitHub issue

We used to have this on Mac, but it had to be removed in #191 as it was preventing:

  • VFS4G from modifying the .git/hooks a as part of mounting
  • gvfs repair from being able to fix up files in the .git folder

As the feature is re-enabled we’ll need to consider how we can still support the scenarios above. Perhaps we can support a new xattr that VFS4G sets on folders letting the kext know that offline modifications are allowed? Or maybe there is some way that we can ACL/mark the VFS4G processes so that the kext knows that they should be allowed to make offline modifications?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
wilbakercommented, Aug 19, 2019

@pmj thanks!

I think we can close this out.

Regarding this item:

Delete operations that are for renames (i.e. moving a file out of the offline repo)

I think we can stick with the current behavior and adjust it later if we get feedback that the current behavior is undesirable.

I’d agree, let’s cover that as part of #457.

I’ve updated the description of #457 to include this work.

0reactions
pmjcommented, Aug 19, 2019

With #1429 done, there’s now not much left to do here. A few loose ends:

[@wilbaker] Ideally we’d block these as well:

  • Delete operations that are for renames (i.e. moving a file out of the offline repo)

This is now implemented for empty files. I think that’s what we want: we already allow deleting files for other reasons than renaming, and I think it’s reasonable to allow a user to move hydrated or full files out of the repo, possibly in order to back up some work they did before deleting the repo entirely.

  • Moving files into the offline repo (not sure if we’d get a KAUTH_VNODE_ADD_FILE for this)

We do indeed get a callback with that action, or KAUTH_VNODE_ADD_SUBDIRECTORY if the thing being moved is a directory, and both are now blocked on offline roots as of #1429.

  • Mode changes to placeholders (both empty and hydrated) in the offline root. Note that we still have #457 to detect mode changes in the first place, and so we might not be able to add that check now.

I think this will be a case of blocking KAUTH_VNODE_WRITE_SECURITY when offline, but I’d have to check - and yes, I’d agree, let’s cover that as part of #457.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mac: Detect mode changes to placeholder files #457
Allow core.filemode to be configured by platform #590 ... Mac: Ensure that the kext blocks file I\O that that is not allowed when...
Read more >
Accidentally Blocked a Kext and Can't Unblock It
I've been trying to install Intel Power Gadget on my macBook which requires loading a kernel extension. However, I accidentally clicked the ...
Read more >
Alternative for Virtual file system (VFS) kernel extension on ...
we have developed a kernel extension (KEXT) for a virtual file system (VFS) on macOS to integrate our software with external programs like...
Read more >
Where are the kext files? : r/hackintosh
In macOS, a kext appears as a file/container. In actuality, it's a folder with .kext on the end of the name, which is...
Read more >
Using Git LFS and VFS for Git introduction
A solution to work with binary files is using Git LFS (or Git Large File System). This is an extension to Git and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found