1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

s3:rpc:wkssvc_nt: dom_user_cmp uses NUMERIC_CMP

usr->login_time is time_t, which is often bigger than int.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 75682e397b9cf22d04a5d80252554c6b2e376793)
This commit is contained in:
Douglas Bagnall 2024-04-07 15:47:12 +12:00 committed by Jule Anger
parent 835594dea0
commit 2f6c5b6603

View File

@ -50,7 +50,7 @@ static int dom_user_cmp(const struct dom_usr *usr1, const struct dom_usr *usr2)
/* Called from qsort to compare two domain users in a dom_usr_t array
* for sorting by login time. Return >0 if usr1 login time was later
* than usr2 login time, <0 if it was earlier */
return (usr1->login_time - usr2->login_time);
return NUMERIC_CMP(usr1->login_time, usr2->login_time);
}
/*******************************************************************