]> git.eshelyaron.com Git - emacs.git/commitdiff
(fstat): Use pw_uid and pw_gid from the_passwd structure for st_uid and
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 Jan 2008 15:25:12 +0000 (15:25 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 Jan 2008 15:25:12 +0000 (15:25 +0000)
st_gid of the file.

src/ChangeLog
src/w32.c

index 9f620aae33e7a1bf6dafdf6c083ba53c99999da1..b3ab1ad9904d156fcc5fc8b5c0a255183d0baa51 100644 (file)
@@ -7,6 +7,8 @@
        (init_user_info): Use the above two new functions to retrieve uid
        and gid.  Use 500/513, the Windows defaults, as Administrator's
        uid/gid.
+       (fstat): Use pw_uid and pw_gid from the_passwd structure for
+       st_uid and st_gid of the file.
 
 2008-01-26  Jason Rumney  <jasonr@gnu.org>
 
index adfac347549669457e75529ea5a149171a03fa5a..dfec1dc8f8a65fc1cc57c666821f7261860d3e41 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -2768,8 +2768,8 @@ fstat (int desc, struct stat * buf)
     buf->st_ino = fake_inode;
 
   /* consider files to belong to current user */
-  buf->st_uid = 0;
-  buf->st_gid = 0;
+  buf->st_uid = the_passwd.pw_uid;
+  buf->st_gid = the_passwd.pw_gid;
 
   buf->st_dev = info.dwVolumeSerialNumber;
   buf->st_rdev = info.dwVolumeSerialNumber;