Post

Replies

Boosts

Views

Activity

Reply to Bundle ID vs signing identifier
Mostly I'm playing around here -- I wanted to log if that sort of discrepancy came up. And then I wanted to find the path to the possibly-offending process, and flag it for examination. And I knew I could go from bundle ID to path, and vice versa, and that was the reason I was asking.
Nov ’21
Reply to codesign fails when started from SSH, succeed in Terminal
What is different between SSH session and GUI Terminal session ? The main difference is that the login keychain is unlocked. You can do the same thing by unlocking the login keychain in your ssh session. However, what I don't know -- and would really like to know -- is what codesign is looking for in the login keychain that isn't in the other keychain. So I could move it to that keychain and not have to worry about the login one for building.
Topic: Code Signing SubTopic: General Tags:
Oct ’21
Reply to Can I get the current active user information (for macOS)?
Oooh! CSIdentityQueryCreateForCurrentUser looks like it, maybe? I will experiment! Thank you! 😄 Edited to Add Yes, that worked! My code here is really ugly, but it does seem to work. So thank you very much! { CSIdentityQueryRef query; CFErrorRef error; CFArrayRef identityArray; // create the identity query based on name query = CSIdentityQueryCreateForCurrentUser(kCFAllocatorDefault);   // execute the query if (CSIdentityQueryExecute(query, kCSIdentityQueryGenerateUpdateEvents, &error)) { printf("Success!\n"); // retrieve the results of the identity query identityArray = CSIdentityQueryCopyResults(query); printf("Got %lu entries in the array\n", CFArrayGetCount(identityArray)); for (size_t indx = 0; indx < CFArrayGetCount(identityArray); indx++) { CSIdentityRef identity = (CSIdentityRef)CFArrayGetValueAtIndex(identityArray, indx); CFStringRef name = CSIdentityGetPosixName(identity); const size_t maxSize = 1024; char *buffer = (char *)malloc(maxSize); if (CFStringGetCString(name, buffer, maxSize,       kCFStringEncodingUTF8)) { printf("Current user = %s\n", buffer); } else { printf("Could not get user string?\n"); } } // do something with identityArray //     return (CSIdentityRef)CFArrayGetValueAtIndex(users, 0);     } CFRelease(query); }
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to Bundle ID vs signing identifier
Mostly I'm playing around here -- I wanted to log if that sort of discrepancy came up. And then I wanted to find the path to the possibly-offending process, and flag it for examination. And I knew I could go from bundle ID to path, and vice versa, and that was the reason I was asking.
Replies
Boosts
Views
Activity
Nov ’21
Reply to User doesn't have permission to launch the app (managed networks)
I was referring to "Signing a Daemon with a Restricted Entitlement." The bundle is signed. I'll go over your article again; I've confirmed it's the entitlements it doesn't like. (It turns out I don't currently need the entitlements yet -- but the plan is to use Endpoint Security in it eventually, I just don't have that permission yet.)
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to codesign fails when started from SSH, succeed in Terminal
What is different between SSH session and GUI Terminal session ? The main difference is that the login keychain is unlocked. You can do the same thing by unlocking the login keychain in your ssh session. However, what I don't know -- and would really like to know -- is what codesign is looking for in the login keychain that isn't in the other keychain. So I could move it to that keychain and not have to worry about the login one for building.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Keeping track of users in macOS
Requirement to have a single daemon that uses the current “active” user. Not my choice. 😊
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Keeping track of users in macOS
There is an answer!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Can I get the current active user information (for macOS)?
Oh darn it! No, that doesn't work! I forgot to test while actually using FUS, and in the one session, it continues to show the same user, even if I switch to between users. :(
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Can I get the current active user information (for macOS)?
Oooh! CSIdentityQueryCreateForCurrentUser looks like it, maybe? I will experiment! Thank you! 😄 Edited to Add Yes, that worked! My code here is really ugly, but it does seem to work. So thank you very much! { CSIdentityQueryRef query; CFErrorRef error; CFArrayRef identityArray; // create the identity query based on name query = CSIdentityQueryCreateForCurrentUser(kCFAllocatorDefault);   // execute the query if (CSIdentityQueryExecute(query, kCSIdentityQueryGenerateUpdateEvents, &error)) { printf("Success!\n"); // retrieve the results of the identity query identityArray = CSIdentityQueryCopyResults(query); printf("Got %lu entries in the array\n", CFArrayGetCount(identityArray)); for (size_t indx = 0; indx < CFArrayGetCount(identityArray); indx++) { CSIdentityRef identity = (CSIdentityRef)CFArrayGetValueAtIndex(identityArray, indx); CFStringRef name = CSIdentityGetPosixName(identity); const size_t maxSize = 1024; char *buffer = (char *)malloc(maxSize); if (CFStringGetCString(name, buffer, maxSize,       kCFStringEncodingUTF8)) { printf("Current user = %s\n", buffer); } else { printf("Could not get user string?\n"); } } // do something with identityArray //     return (CSIdentityRef)CFArrayGetValueAtIndex(users, 0);     } CFRelease(query); }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Can one do automated testing with a System Extension? (And if so, how?)
Well, part of my uncertainty there was, how do I unit-test the methods that are supposed to be delegates of system APIs? As an example, handleNewFlow. I'm guessing that won't particularly be doable? Although since the data going back and forth is actual data, not IP packets, that makes writing tests for those easier. 😄
Replies
Boosts
Views
Activity
Oct ’21
Reply to Instruments command-line won't work for me
The answer is: it's "behaving correctly," because the command is deprecated, and removed in Monterey.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Transparent Proxy Provider and data limits?
Then shouldn't that be mentioned somewhere? 😄 Especially since I can read a lot more than that off a socket, and the VPN extensions present themselves as data, not IP, based?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Xcode, multiple targets, and shared/common files: Did I do this correctly?
Amusingly, the forum software doesn't let me insult myself. 😄 Good for it, I say.
Replies
Boosts
Views
Activity
Sep ’21