]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Use geteuid() instead of getuid()
authorVMware, Inc <>
Tue, 28 Jun 2011 19:43:29 +0000 (12:43 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 28 Jun 2011 19:43:29 +0000 (12:43 -0700)
We should effectively use geteuid() instead of getuid().

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/hgfsServer/hgfsServerLinux.c

index fa2964267f472a4bfcbefaae9f4e616311ea6f57..a98451374fdfca151199c5d08d7908710c784ab2 100644 (file)
@@ -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",