This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 8a2b3b0492d fs/rpmsgfs: carry 32-bit uid and gid
8a2b3b0492d is described below
commit 8a2b3b0492dd020ba11162d750348e1053155b34
Author: Xiang Xiao <[email protected]>
AuthorDate: Wed Nov 11 20:53:11 2026 +0800
fs/rpmsgfs: carry 32-bit uid and gid
uid_t and gid_t are unsigned int, but struct rpmsgfs_stat_priv_s
carries them as int16_t. An id above 32767 is truncated on both the
chown and the stat path, so chown(path, 40000, ...) through rpmsgfs
sets the owner to 4294941760 on the server and stat() reports that.
Widen both fields to uint32_t. This changes the layout of the stat
and chstat messages, so the client and the server must be updated
together.
Signed-off-by: Xiang Xiao <[email protected]>
Signed-off-by: jingfei <[email protected]>
---
fs/rpmsgfs/rpmsgfs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/rpmsgfs/rpmsgfs.h b/fs/rpmsgfs/rpmsgfs.h
index da44f8ee90d..2a73bafe831 100644
--- a/fs/rpmsgfs/rpmsgfs.h
+++ b/fs/rpmsgfs/rpmsgfs.h
@@ -136,8 +136,8 @@ begin_packed_struct struct rpmsgfs_stat_priv_s
int64_t ctim_sec; /* Time of last status change, seconds */
int64_t ctim_nsec; /* Time of last status change, nanoseconds */
uint64_t blocks; /* Number of blocks allocated */
- int16_t uid; /* User ID of file */
- int16_t gid; /* Group ID of file */
+ uint32_t uid; /* User ID of file */
+ uint32_t gid; /* Group ID of file */
int16_t blksize; /* Block size used for filesystem I/O */
uint16_t nlink; /* Number of hard links to the file */
} end_packed_struct;