From 248c21c5f20f60961cb18de1f90b995dd6ce8b18 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 26 Jan 2008 15:25:12 +0000 Subject: [PATCH] (fstat): Use pw_uid and pw_gid from the_passwd structure for st_uid and st_gid of the file. --- src/ChangeLog | 2 ++ src/w32.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.2