Most active commenters
  • oefrha(5)
  • saagarjha(5)

←back to thread

MacOS Catalina: Slow by Design?

(sigpipe.macromates.com)
2031 points jrk | 24 comments | | HN request time: 0.948s | source | bottom
Show context
nromiun ◴[] No.23273360[source]
> This is not just for files downloaded from the internet, nor is it only when you launch them via Finder, this is everything. So even if you write a one line shell script and run it in a terminal, you will get a delay!

> Apple’s most recent OS where it appears that low-level system API such as exec and getxattr now do synchronous network activity before returning to the caller.

Can anyone confirm this? Because honestly this is just terrifying. I don't think even Windows authorises every process from a server. This doesn't sound good for both privacy and speed.

replies(7): >>23273390 #>>23273492 #>>23273731 #>>23274022 #>>23274474 #>>23274793 #>>23278253 #
1. mbreese ◴[] No.23273492[source]
There are two new Security/Privacy Settings that I just noticed last night.

"Full Disk Access" to allow a program to access any place on your computer without a warning. A few programs requested this, so it looks like it's been around for a while.

The other one is "Developer Tools" and it looks pretty new. The only application requesting it is "Terminal". This "allows app to run software locally that do not meet the system's security policy". So, my reading of this is that in Terminal, you could run scripts that are unsigned and not be penalized speed-wise.

replies(5): >>23273524 #>>23273855 #>>23274165 #>>23274179 #>>23292922 #
2. 0x0 ◴[] No.23273524[source]
I wonder what "Developer Tools" grants in practice. Clicking the (?) for viewing built-in help does not mention this particular setting, it skips right over it going from "Automation" above it to "Advertising" below it.
replies(2): >>23273895 #>>23274845 #
3. oefrha ◴[] No.23273855[source]
I don't see it on macOS 10.15.4 (19E287). The full list of categories on my Privacy tab:

  - Location Services
  - Contacts
  - Calendars
  - Reminders
  - Photos
  - Camera
  - Microphone
  - Speech Recognition
  - Accessibility
  - Input Monitoring
  - Full Disk Access
  - Files and Folders
  - Screen Recording
  - Automation
  - Advertising
  - Analytics & Improvements
Granted I don't typically use Terminal.app (iTerm 2 user), so I launched terminal and did some privileged stuff. Had to grant Full Disk Access to, say, `ls ~/Library/Mail`, but "Developer Tools" never popped up.

Are you running a beta build or something?

---

Update: Okay, I checked on my other machine and that one does have it (Terminal is listed but disabled by default). What in the actual fuck?!?

replies(4): >>23273907 #>>23274626 #>>23274825 #>>23278629 #
4. ◴[] No.23273895[source]
5. mbreese ◴[] No.23273907[source]
Maybe if you ran Terminal.app once it would work?

(I'm also on 10.15.4 (19E287))

replies(2): >>23273963 #>>23274060 #
6. oefrha ◴[] No.23273963{3}[source]
No, I played around with Terminal.app for quite a while already. Actually the category does show up on another machine of mine (see edit)... I suspected that maybe I never ran Xcode on the first machine since I upgraded to Catalina, so I launched Xcode, but again, no luck. I'm at a complete loss now.
7. asdff ◴[] No.23274060{3}[source]
Terminal actually gives an error if you poke into the top level library folder with full disk access disabled, no prompt to change without me looking on stack overflow for the solution.
8. ken ◴[] No.23274165[source]
Full Disk Access was added in 10.14 (2018), so it's relatively new.
9. jhrmnn ◴[] No.23274179[source]
I'm using the Kitty terminal, and observed the script launch delay described in the blog post. After adding Kitty to "Developer Tools", the delay disappeared. Thanks!
10. Sangeppato ◴[] No.23274626[source]
Maybe you need Xcode, try running "mkdir /Applications/Xcode.app"
replies(2): >>23274689 #>>23274837 #
11. oefrha ◴[] No.23274689{3}[source]
As mentioned in a reply to a sibling, Xcode has been installed (for like five years) on this machine, and launching it doesn't help. The next step would be to compile and run an application with it, which I haven't bothered.
12. saagarjha ◴[] No.23274825[source]
I don't see it on my machine. Do you happen to have System Integrity Protection disabled?
replies(1): >>23275249 #
13. saagarjha ◴[] No.23274837{3}[source]
I would expect checks for Xcode to go through xcselect rather than a simple directory check. Installing the command line tools (sudo xcode-select --install) might actually be a better idea to test this.
replies(1): >>23275347 #
14. saagarjha ◴[] No.23274845[source]
I believe it means the process will no longer check for the Quarantine xattr.
replies(1): >>23284440 #
15. oefrha ◴[] No.23275249{3}[source]
No, SIP is fully enabled on both the machine with the Developer Tools category and the one without.

Interestingly, I rebooted the machine without after some benchmarking and experimentation with syspolicyd (see https://news.ycombinator.com/item?id=23274903), and after the reboot the category has mysteriously surfaced... Not sure what triggered it. Launching Xcode? Xcode and CLT were both installed on the machine, but I'm not sure when I last launched Xcode on this machine. Another possible difference I can think of: the machine without was an in-place upgrade, while the other one IIRC was a clean install of 10.15.

In the worst case scenario, you can probably insert into the TCC database (just a SQLite3 database, located at ~/Library/Application Support/com.apple.TCC/TCC.db) directly:

  INSERT INTO access VALUES('kTCCServiceDeveloperTool','com.apple.Terminal',0,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1590165238);
  INSERT INTO access VALUES('kTCCServiceDeveloperTool','com.googlecode.iterm2',0,1,1,NULL,NULL,NULL,'UNUSED',NULL,0,1590168367);
(Should be pretty self-explanatory. The first entry is for Terminal.app, the second entry is for iTerm 2.)

Back up, obviously. I'm not on the hook for any data loss or system bricking.

replies(1): >>23275716 #
16. Sangeppato ◴[] No.23275347{4}[source]
I thought the same, but actually this method worked for me when I wanted the the Spotlight "Developer" option to show up (the CLT were already installed). I have the Developer panel under "privacy" as well, even if I never installed Xcode on my machine
17. saagarjha ◴[] No.23275716{4}[source]
> In the worst case scenario, you can probably insert into the TCC database

Does this not require disabling SIP?

replies(1): >>23275789 #
18. oefrha ◴[] No.23275789{5}[source]
Yes. I got mine to appear through mysterious yet fully SIP-enabled means, but if all else fails for you you can temporarily disable SIP to change this.
19. xenadu02 ◴[] No.23278629[source]
You can make the category appear and put Terminal in it with this command:

sudo spctl developer-mode enable-terminal

replies(1): >>23279451 #
20. saagarjha ◴[] No.23279451{3}[source]
I'd be nice if this was documented somewhere :/
replies(1): >>23281989 #
21. hanche ◴[] No.23281989{4}[source]
I was going to be that guy and say “man spctl”, but that usage isn’t listed there. If you run spctl with no arguments, it will tell you, however. The man pages on macos really do leave something to be desired.
replies(1): >>23283425 #
22. acecilia ◴[] No.23283425{5}[source]
This does not make the "developer tools" panel show up in my machine :( tried everything already
23. 0x0 ◴[] No.23284440{3}[source]
But the quarantine xattr has nothing to do with checking notarization?
24. ether_at_cpan ◴[] No.23292922[source]
via https://lapcatsoftware.com/articles/catalina-executables.htm..., I've added an entry in my /etc/hosts to block requests to api.apple-cloudkit.com:

    127.0.0.1 api.apple-cloudkit.com
    127.0.0.1 *.api.apple-cloudkit.com