From: VMware, Inc <> Date: Tue, 28 Jun 2011 19:43:29 +0000 (-0700) Subject: Use geteuid() instead of getuid() X-Git-Tag: 2011.06.27-437995~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29bbbdbaff67c4ce1caa043dc9e408f226f27f8d;p=thirdparty%2Fopen-vm-tools.git Use geteuid() instead of getuid() We should effectively use geteuid() instead of getuid(). Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c index fa2964267..a98451374 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c @@ -2868,12 +2868,7 @@ HgfsPlatformSetattrFromFd(HgfsHandle file, // IN: file descriptor * to set the files times using futimes. */ - /* - * XXX Bug 718252: Ideally we should use geteuid() instead of - * getuid(). For Nitrogen/Honeycomb, we can live with getuid() - * and fix it later on the *-main. - */ - if (getuid() != statBuf.st_uid) { + if (geteuid() != statBuf.st_uid) { /* We are not the file owner. Check if we are running as root. */ if (!Id_IsSuperUser()) { LOG(4, ("%s: only owner of file %u or root can call futimes\n",