such as sunos4 gid_t is an unsigned short. This prevented the just-added
non-mapped group test from working on sunos4.
}
change_uid = am_root && preserve_uid && st->st_uid != file->uid;
- change_gid = !am_daemon && preserve_gid && file->gid != -1 \
- && st->st_gid != file->gid;
+ change_gid = !am_daemon && preserve_gid && file->gid != (gid_t) -1 && \
+ st->st_gid != file->gid;
if (change_gid && !am_root) {
/* enforce bsd-style group semantics: non-root can only
change to groups that the user is a member of */
if (am_root)
last_out = gid;
else
- last_out = -1;
+ last_out = (gid_t) -1;
return last_out;
}