pub unsafe extern "C-unwind" fn SCDynamicStoreCopyConsoleUser(
store: Option<&SCDynamicStore>,
uid: *mut uid_t,
gid: *mut gid_t,
) -> Option<CFRetained<CFString>>SCDynamicStore and SCDynamicStoreCopySpecific and libc only.Expand description
Gets the name, user ID, and group ID of the currently logged-in user.
Note: this function only provides information about the primary console. It does not provide any details about console sessions that have fast user switched out or about other consoles.
Parameter store: An SCDynamicStoreRef representing the dynamic store
session that should be used for communication with the server.
If NULL, a temporary session will be used.
Parameter uid: A pointer to memory that will be filled with the user ID
of the current console user. If NULL, this value will not
be returned.
Parameter gid: A pointer to memory that will be filled with the group ID
of the current console user. If NULL, this value will not be
returned.
Returns: Returns the user currently logged into the system; NULL if no user is logged in or if an error was encountered. You must release the returned value.