winbindd_cred_cache.c: if ((username == NULL && princ_name == NULL) || ccname == NULL || uid < 0) { return NT_STATUS_INVALID_PARAMETER; } uid < 0 always false. i think need: if ((username == NULL && princ_name == NULL) || ccname == NULL) { return NT_STATUS_INVALID_PARAMETER; } found in PVS-studio 5.10
Well, the problem is that we did not find anywhere that uid_t is *always* unsigned. Can you get us a reference to some official docs that Posix mandates uid_t to be unsigned? Thanks
HP-UX is one case where uid numbers can be negative. uid signesness is not defined, so the check is generally valid.