From: Eli Zaretskii Date: Sat, 26 Jan 2008 15:25:12 +0000 (+0000) Subject: (fstat): Use pw_uid and pw_gid from the_passwd structure for st_uid and X-Git-Tag: emacs-pretest-23.0.90~8389 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=248c21c5f20f60961cb18de1f90b995dd6ce8b18;p=emacs.git (fstat): Use pw_uid and pw_gid from the_passwd structure for st_uid and st_gid of the file. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9f620aae33e..b3ab1ad9904 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 diff --git a/src/w32.c b/src/w32.c index adfac347549..dfec1dc8f8a 100644 --- 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;