From: Oliver Kurth Date: Tue, 19 Feb 2019 20:51:31 +0000 (-0800) Subject: Common source file changes not directly applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4caacb6a4fba771d2d416505ec3c3014fac3cb82;p=thirdparty%2Fopen-vm-tools.git Common source file changes not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c index a3cc0ea96..1bb86f483 100644 --- a/open-vm-tools/lib/misc/idLinux.c +++ b/open-vm-tools/lib/misc/idLinux.c @@ -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