]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/gethostuuid.c
xnu-6153.101.6.tar.gz
[apple/xnu.git] / libsyscall / wrappers / gethostuuid.c
index 691c4fa86edc076179aee5a583e0b1fd66c92ae5..60b0e26de7b4673c0f6c8ba589b33fefd6afb9c6 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "gethostuuid_private.h"
 
-extern int __gethostuuid(uuid_t, const struct timespec *, int);
+extern int __gethostuuid(uuid_t, const struct timespec *);
 
 static volatile int (*_gethostuuid_callback)(uuid_t) = (void *)0;
 
@@ -37,8 +37,8 @@ int
 gethostuuid(uuid_t uuid, const struct timespec *timeout)
 {
        int result;
-       
-       result = __gethostuuid(uuid, timeout, 0);
+
+       result = __gethostuuid(uuid, timeout);
        if ((result == -1) && (errno == EPERM)) {
                if (_gethostuuid_callback) {
                        result = _gethostuuid_callback(uuid);
@@ -47,21 +47,20 @@ gethostuuid(uuid_t uuid, const struct timespec *timeout)
                        memset(uuid, 0x00, sizeof(*uuid));
                }
        }
-       
+
        return result;
 }
 
-/* SPI to call gethostuuid syscall directly, without fallback */
+/* SPI to call gethostuuid syscall directly, without fallback, need an entitlement */
 int
 _getprivatesystemidentifier(uuid_t uuid, const struct timespec *timeout)
 {
-       return __gethostuuid(uuid, timeout, 1);
+       return __gethostuuid(uuid, timeout);
 }
 
 int
 _register_gethostuuid_callback(int (*new_callback)(uuid_t))
 {
-
        if (__sync_bool_compare_and_swap((void **)&_gethostuuid_callback, (void *)0, (void *)new_callback)) {
                return 0;
        } else {