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]>