file: provide user name and group name lookups for stat listings master
authorPaul Donald <[email protected]>
Tue, 2 Dec 2025 23:34:52 +0000 (00:34 +0100)
committerRobert Marko <[email protected]>
Wed, 3 Dec 2025 21:48:31 +0000 (22:48 +0100)
commitffb9961c1f8bc50830fdd4e144570f11062c2601
tree8b615063d5923fb9e3be2708682f2a1d45ab6624
parenta284e7751fa76a0a9a5db3893e8abf335da89aaf
file: provide user name and group name lookups for stat listings

This provides more user friendly information than numeric IDs.

Before this patch:

ubus call file list '{"path":"/proc"}'
...
{
"name": "kcore",
"type": "file",
"size": 140737471586304,
"mode": 33024,
"atime": 1764716086,
"mtime": 1764716086,
"ctime": 1764716086,
"inode": -268435271,
"uid": 0,
"gid": 0,
},
...

After this patch:

ubus call file list '{"path":"/proc"}'
...
{
"name": "kcore",
"type": "file",
"size": 140737471586304,
"mode": 33024,
"atime": 1764716086,
"mtime": 1764716086,
"ctime": 1764716086,
"inode": -268435271,
"uid": 0,
"gid": 0,
"user": "root",
"group": "root"
},
...

Tested on: OpenWrt SNAPSHOT r32139-1f879b8839 / 6.12.59
Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/rpcd/pull/22
Signed-off-by: Robert Marko <[email protected]>
file.c