• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/configd-699.1.5/configd.tproj/

Lines Matching refs:session

38 #include "session.h"
49 /* information maintained for each active session */
52 static int lastSession = -1; /* # of last used session */
57 /* temp session */
72 /* look for matching session (note: slot 0 is the "server" port) */
111 temp_session = sessions[0]; /* use "server" session */
150 /* if first session (the "server" port) */
157 // allocate a new session for "the" server
165 /* check to see if we already have an open session (note: slot 0 is the "server" port) */
176 /* and keep looking for a matching session */
192 /* add a new session */
197 /* expand the session list */
203 // allocate a session for this client
249 newSession->serverPort = _SC_CFMachPortCreateWithPort("SCDynamicStore/session",
302 * session entry still exists.
343 * get rid of the per-session structure.
349 /* we are removing the last session, update last used slot */
361 SCLog(TRUE, LOG_ERR, CFSTR("MACH_NOTIFY_NO_SENDERS w/no session, port = %d"), server);
362 __MACH_PORT_DEBUG(TRUE, "*** cleanupSession w/no session", server);
428 sessionName(serverSessionRef session)
434 sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), session->key);
446 copyEntitlement(serverSessionRef session, CFStringRef entitlement)
452 task = SecTaskCreateWithAuditToken(NULL, session->auditToken);
469 sessionName(session));
478 sessionName(session));
486 sessionPid(serverSessionRef session)
491 caller_pid = audit_token_to_pid(session->auditToken);
493 audit_token_to_au32(session->auditToken,
510 hasRootAccess(serverSessionRef session)
514 if (session->callerRootAccess == UNKNOWN) {
516 session->callerEUID = audit_token_to_euid(session->auditToken);
518 audit_token_to_au32(session->auditToken,
520 &session->callerEUID, // euid
528 session->callerRootAccess = (session->callerEUID == 0) ? YES : NO;
531 return (session->callerRootAccess == YES) ? TRUE : FALSE;
547 hasWriteAccess(serverSessionRef session, CFStringRef key)
554 if (hasRootAccess(session)) {
559 pid = sessionPid(session);
589 sessionPid(session),
595 if (session->callerWriteEntitlement == kCFNull) {
596 session->callerWriteEntitlement = copyEntitlement(session,
600 if (session->callerWriteEntitlement == NULL) {
604 if (isA_CFBoolean(session->callerWriteEntitlement) &&
605 CFBooleanGetValue(session->callerWriteEntitlement)) {
610 if (isA_CFDictionary(session->callerWriteEntitlement)) {
614 keys = CFDictionaryGetValue(session->callerWriteEntitlement, CFSTR("keys"));
625 patterns = CFDictionaryGetValue(session->callerWriteEntitlement, CFSTR("patterns"));
651 hasPathAccess(serverSessionRef session, const char *path)
662 pid = audit_token_to_pid(session->auditToken);
664 audit_token_to_au32(session->auditToken,