/*********************************************************
- * Copyright (C) 1998-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
gid_t thread_gid;
int ret;
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
ret = syscall(SYS_gettid, &thread_uid, &thread_gid);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
if (ret != -1) {
/*
#if TARGET_OS_IPHONE
Warning("XXXIOS: implement %s\n", __func__);
#else
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
syscall(SYS_settid, KAUTH_UID_NONE, KAUTH_GID_NONE /* Ignored. */);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
#endif
#else
Id_SetRESUid((uid_t) -1, (uid_t) 0, (uid_t) -1); // effectively root
ASSERT(uid != 0); // Don't allow cheating like this
#if defined(__APPLE__)
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
if (syscall(SYS_settid, uid, getgid()) == -1) {
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
Log("Failed to release super user privileges.\n");
}
#else