/*
- * Copyright (c) 2004-2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
static TAILQ_HEAD(,kauth_scope) kauth_scopes;
static int kauth_add_callback_to_scope(kauth_scope_t sp, kauth_listener_t klp);
-static void kauth_scope_init(void) __attribute__((section("__TEXT, initcode")));
+static void kauth_scope_init(void);
static kauth_scope_t kauth_alloc_scope(const char *identifier, kauth_scope_callback_t callback, void *idata);
static kauth_listener_t kauth_alloc_listener(const char *identifier, kauth_scope_callback_t callback, void *idata);
#if 0
/* bring up kauth subsystem components */
kauth_cred_init();
+#if CONFIG_EXT_RESOLVER
kauth_identity_init();
kauth_groups_init();
+#endif
kauth_scope_init();
+#if CONFIG_EXT_RESOLVER
kauth_resolver_init();
-
+#endif
/* can't alloc locks after this */
lck_grp_free(kauth_lck_grp);
kauth_lck_grp = NULL;
/* XXX == 0 ? */
return((kauth_cred_getuid(credential) == 0) ?
KAUTH_RESULT_ALLOW : KAUTH_RESULT_DENY);
- break;
}
/* no explicit result, so defer to others in the chain */
KAUTH_DEBUG(" ERROR - could not get parent directory ACL for inheritance");
return(error);
}
- if (VATTR_IS_SUPPORTED(&dva, va_acl)) {
+ if (VATTR_IS_SUPPORTED(&dva, va_acl))
inherit = dva.va_acl;
- /*
- * If there is an ACL on the parent directory, then
- * there are potentially inheritable ACE entries, but
- * if the flags on the directory ACL say not to
- * inherit, then we don't inherit. This allows for
- * per directory rerooting of the inheritable ACL
- * hierarchy.
- */
- if (inherit != NULL && inherit->acl_flags & KAUTH_ACL_NO_INHERIT) {
- kauth_acl_free(inherit);
- inherit = NULL;
- }
- }
}
/*