[PATCH v2] erofs-utils: lib: correctly set {u,g}id in erofs_rebuild_make_root()
zhaoyifan (H)
zhaoyifan28 at huawei.com
Wed Jan 14 19:38:09 AEDT 2026
On 2026/1/14 16:09, Gao Xiang wrote:
>>> root->i_uid = params && params->fixed_uid < 0 ? getuid() :
>>> params->fixed_uid;
>>
>> will sigfault if `params == NULL`, how about
>>
>> root->i_uid = (!params || params->fixed_uid < 0) ? getuid() :
>> params->fixed_uid;
Hi Xiang,
v3 patch sent, however I'm afraid we can't compare fixed_{u,g}id with 0,
as it's of an unsigned type. I've kept ` params->fixed_uid == -1` for now.
Thanks,
Yifan
>
> Sorry about my braino.
>
> Thanks,
> Gao Xiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20260114/6293ae50/attachment.htm>
More information about the Linux-erofs
mailing list