consoleUser = SCDynamicstoreCopyConsoleUser(NULL, &uid, &gid);
the string is empty, but not NULL. uid
and gid
are set properly.
Any idea why this would happen? NB: it only happens from a LaunchAgent, for some reason; if I isolate the code in question, and run it via CLI, it works exactly as expected. And it only seems to happen for one person -- but for him, it happens on both Intel and Apple Silicon.