Jessica Clarke <[email protected]> writes:
> This is quite a poor commit message. What was wrong with it? Especially
> when the diff is cluttered with reformatting. I cannot obviously see
> any behavioural changes, just some changes from & to && that I don’t
> believe technically matter, even if poor practice and not intended.
Take a closer look here:
>> - if (!dounpriv &
>> - (gid != (gid_t)-1 && gid != to_sb.st_gid) ||
>> - (uid != (uid_t)-1 && uid != to_sb.st_uid))
>> + if (!dounpriv && ((gid != (gid_t)-1 && gid != to_sb.st_gid) ||
>> + (uid != (uid_t)-1 && uid != to_sb.st_uid))) {
The intended logic is:
if not unpriv and (need to set gid or need to set uid)
The actual logic is:
if (not unpriv and need to set gid) or need to set uid
Luckily it had no practical effect because uid and gid are always -1
when dounpriv is non-zero.
I pulled the gid line up to match the formatting of the previous
conditional, ten or so lines back.
DES
--
Dag-Erling Smørgrav - [email protected]