Commit 248c21c5 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(fstat): Use pw_uid and pw_gid from the_passwd structure for st_uid and

st_gid of the file.
parent 6811b9f4
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
(init_user_info): Use the above two new functions to retrieve uid (init_user_info): Use the above two new functions to retrieve uid
and gid. Use 500/513, the Windows defaults, as Administrator's and gid. Use 500/513, the Windows defaults, as Administrator's
uid/gid. 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> 2008-01-26 Jason Rumney <jasonr@gnu.org>
......
...@@ -2768,8 +2768,8 @@ fstat (int desc, struct stat * buf) ...@@ -2768,8 +2768,8 @@ fstat (int desc, struct stat * buf)
buf->st_ino = fake_inode; buf->st_ino = fake_inode;
/* consider files to belong to current user */ /* consider files to belong to current user */
buf->st_uid = 0; buf->st_uid = the_passwd.pw_uid;
buf->st_gid = 0; buf->st_gid = the_passwd.pw_gid;
buf->st_dev = info.dwVolumeSerialNumber; buf->st_dev = info.dwVolumeSerialNumber;
buf->st_rdev = info.dwVolumeSerialNumber; buf->st_rdev = info.dwVolumeSerialNumber;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment