]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file changes not directly applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)
committerOliver Kurth <okurth@vmware.com>
Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)
open-vm-tools/lib/misc/idLinux.c

index a3cc0ea961cf6cfde881f8c653a1198908327216..1bb86f483919d894a7d1d3408886f58f059c04f2 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * 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
@@ -470,7 +470,14 @@ IdAuthCreate(void)
    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) {
       /*
@@ -938,7 +945,14 @@ Id_BeginSuperUser(void)
 #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
@@ -974,7 +988,14 @@ Id_EndSuperUser(uid_t uid)  // IN:
       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