Hi Thomas,

thanks for your review.

> You only want to change the group id of the created file, right? Could
> you then please specify -1 as user id, instead of geteuid()? That
> makes the intent clearer.
> 
> ("If owner or group is specified as (uid_t)-1 or (gid_t)-1
> respectively, the corresponding ID of the file is unchanged.")

Hm, I think it doesn't harm to specify the effective user id of our process 
since that is what we want anyway.

> small nit:
> you check for == 0 to indicate success, some lines below we use != -1.

The doc of the APIs specifies that upon success 0 shall be returned, -1 
otherwise. So I guess both ways would be correct. I think I'll leave it as it 
is right now, don't want to change more lines of code than necessary 😊

Best regards
Christoph

Reply via email to