Permission Manager: add permission management for screencopy (#9930)

This commit is contained in:
Vaxry 2025-04-08 19:39:53 +02:00 committed by GitHub
parent 642f394eb3
commit 260d8e1f71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 481 additions and 32 deletions

View file

@ -192,7 +192,7 @@ void NCrashReporter::createAndSaveCrash(int sig) {
#endif
};
u_int miblen = sizeof(mib) / sizeof(mib[0]);
char exe[PATH_MAX] = "";
char exe[PATH_MAX] = "/nonexistent";
size_t sz = sizeof(exe);
sysctl(mib, miblen, &exe, &sz, NULL, 0);
const auto FPATH = std::filesystem::canonical(exe);