News for hackers. Stuff that matters.
Re:MacOS Catalina: Slow by Design? by nromiun on Friday May 22, 2020 @11:50AM (#23273360)
> 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.

Re:MacOS Catalina: Slow by Design? by mbreese on Friday May 22, 2020 @12:01PM (#23273492)
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.

Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @12:30PM (#23273855)
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?!?

Re:MacOS Catalina: Slow by Design? by xenadu02 on Friday May 22, 2020 @08:23PM (#23278629)
You can make the category appear and put Terminal in it with this command:

sudo spctl developer-mode enable-terminal

Re:MacOS Catalina: Slow by Design? by saagarjha on Friday May 22, 2020 @10:58PM (#23279451)
I'd be nice if this was documented somewhere :/
Re:MacOS Catalina: Slow by Design? by hanche on Saturday May 23, 2020 @07:12AM (#23281989)
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.
Re:MacOS Catalina: Slow by Design? by acecilia on Saturday May 23, 2020 @10:54AM (#23283425)
This does not make the "developer tools" panel show up in my machine :( tried everything already
Re:MacOS Catalina: Slow by Design? by saagarjha on Friday May 22, 2020 @01:42PM (#23274825)
I don't see it on my machine. Do you happen to have System Integrity Protection disabled?
Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @02:21PM (#23275249)
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.

Re:MacOS Catalina: Slow by Design? by saagarjha on Friday May 22, 2020 @03:06PM (#23275716)
> In the worst case scenario, you can probably insert into the TCC database

Does this not require disabling SIP?

Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @03:13PM (#23275789)
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.
Re:MacOS Catalina: Slow by Design? by Sangeppato on Friday May 22, 2020 @01:27PM (#23274626)
Maybe you need Xcode, try running "mkdir /Applications/Xcode.app"
Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @01:32PM (#23274689)
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.
Re:MacOS Catalina: Slow by Design? by saagarjha on Friday May 22, 2020 @01:43PM (#23274837)
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.
Re:MacOS Catalina: Slow by Design? by Sangeppato on Friday May 22, 2020 @02:30PM (#23275347)
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
Re:MacOS Catalina: Slow by Design? by mbreese on Friday May 22, 2020 @12:34PM (#23273907)
Maybe if you ran Terminal.app once it would work?

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

Re:MacOS Catalina: Slow by Design? by oefrha on Friday May 22, 2020 @12:38PM (#23273963)
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.
Re:MacOS Catalina: Slow by Design? by asdff on Friday May 22, 2020 @12:45PM (#23274060)
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.
Re:MacOS Catalina: Slow by Design? by 0x0 on Friday May 22, 2020 @12:04PM (#23273524)
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.
Re:MacOS Catalina: Slow by Design? by saagarjha on Friday May 22, 2020 @01:44PM (#23274845)
I believe it means the process will no longer check for the Quarantine xattr.
Re:MacOS Catalina: Slow by Design? by 0x0 on Saturday May 23, 2020 @12:51PM (#23284440)
But the quarantine xattr has nothing to do with checking notarization?
Re:MacOS Catalina: Slow by Design? by ether_at_cpan on Sunday May 24, 2020 @01:11PM (#23292922)
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
Re:MacOS Catalina: Slow by Design? by ken on Friday May 22, 2020 @12:53PM (#23274165)
Full Disk Access was added in 10.14 (2018), so it's relatively new.
Re:MacOS Catalina: Slow by Design? by jhrmnn on Friday May 22, 2020 @12:54PM (#23274179)
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!
Re:MacOS Catalina: Slow by Design? by dTal on Friday May 22, 2020 @07:24PM (#23278253)
Making this about speed is burying the lede. From a privacy and user-freedom perspective, it's horrifying.

Don't think so? Apple now theoretically has a centralized database of every Mac user who's ever used youtube-dl. Or Tor. Or TrueCrypt.

Re:MacOS Catalina: Slow by Design? by gitgud on Friday May 22, 2020 @08:27PM (#23278648)
Richard Stallman's ideals have become a bit less crazy for me now...

Either you have the ability to control the software, or it controls you

Re:MacOS Catalina: Slow by Design? by verytrivial on Saturday May 23, 2020 @09:53AM (#23282939)
I think coming to this realisation about Stallman's ideas (not the man, mind) is something that most rational computer users are bound to do. It happens at different times for different people, but I think people very rarely go back after that "Hang on a second ....??" moment.
Re:MacOS Catalina: Slow by Design? by m463 on Sunday May 24, 2020 @10:31AM (#23291770)
I remember once he said "proprietary software subjugates people" and I just sort of blinked a bit. It seemed sort of over the top. And over time I started to understand that the way things end up working out, it is very true.
Re:MacOS Catalina: Slow by Design? by hexchain on Sunday May 24, 2020 @05:37PM (#23295037)
I always wonder why people usually choose to neglect privacy issues about Apple.

First, there was Apple scanning photos to check for child abuse[0] (that obviously got no attention on this site), then there was this one - Apple uploading hashes of all unsigned executables you run.

Do people really accept that company's "privacy" selling point?

[0] https://news.ycombinator.com/item?id=21180019, https://news.ycombinator.com/item?id=22008855

Re:MacOS Catalina: Slow by Design? by acecilia on Saturday May 23, 2020 @07:52PM (#23287739)
Is it even legal that Apple is retrieving this information?
Re:MacOS Catalina: Slow by Design? by threeseed on Friday May 22, 2020 @07:32PM (#23278313)
Apple already has every iPhone user's photos, messages, browsing history, keychains etc.

Not sure how a list of installed apps is going to be worse than that.

Re:MacOS Catalina: Slow by Design? by saagarjha on Friday May 22, 2020 @07:35PM (#23278326)
Not if you choose to not sync them.
Re:MacOS Catalina: Slow by Design? by radicaldreamer on Friday May 22, 2020 @09:19PM (#23278936)
Yup, you can choose to not use iCloud backup and back up offline in an encrypted way (even over wifi) if you’d like.
Re:MacOS Catalina: Slow by Design? by ccmcarey on Friday May 22, 2020 @12:21PM (#23273731)
How could this possibly not be absolutely awful on projects that run hundreds of executables during their execution (e.g. some shell wrappers like oh-my-zsh call out to a large amount of different scripts every time they run).
Re:MacOS Catalina: Slow by Design? by parhamn on Friday May 22, 2020 @12:46PM (#23274067)
It looks like it is done once by executable lifetime. Changing the content doesn't cause it to rerun.
Re:MacOS Catalina: Slow by Design? by gowld on Friday May 22, 2020 @07:45PM (#23278393)
If you don’t trust Apple, don’t run a multi Gigabyte closed source OS they provide.
Re:MacOS Catalina: Slow by Design? by parhamn on Friday May 22, 2020 @12:43PM (#23274022)
I can confirm that executing a trivial script takes 20-200ms longer on the first run. Using 10.15.
Re:MacOS Catalina: Slow by Design? by neurobashing on Friday May 22, 2020 @01:14PM (#23274474)
not sure if I'm lucky or somehow I disabled something but the trivial script problem isn't affecting me on any of my machines. I am using Homebrew for a large % of command line/scripting so maybe that's why?
Re:MacOS Catalina: Slow by Design? by greatjack613 on Friday May 22, 2020 @11:53AM (#23273390)
Privacy it may be a plus since in theory notarization provides some protection.

Speed, definitely not, this is going to make things slowwwww

Re:MacOS Catalina: Slow by Design? by tromp on Friday May 22, 2020 @11:55AM (#23273412)
> provides some protection.

That's security, not privacy...

Re:MacOS Catalina: Slow by Design? by sooheon on Friday May 22, 2020 @12:06PM (#23273557)
Although insecurity leads to less privacy as well.
Re:MacOS Catalina: Slow by Design? by ashtonkem on Friday May 22, 2020 @12:19PM (#23273711)
Insecurity leads to loss of privacy, but security does not lead to privacy. Things can be secure and non-private by design.
Re:MacOS Catalina: Slow by Design? by yjftsjthsd-h on Friday May 22, 2020 @12:20PM (#23273717)
Sometimes, but sometimes security measures lead to less privacy. Say, if executing local programs sends information to a remote server.
Re:MacOS Catalina: Slow by Design? by Razengan on Friday May 22, 2020 @12:39PM (#23273973)
If that information can’t be used to identify anyone then it retains privacy while being secure. Being slow would still be an issue.
Re:MacOS Catalina: Slow by Design? by simion314 on Friday May 22, 2020 @02:55PM (#23275588)
But you can't be 100% sure that the server where the information is sent is not putting in a database your IP, the app you run and whatever else. As a power user I would prefer a prompt before anything is sent.