sudoers plugin: silence most -Wconversion warnings.

This commit is contained in:
Todd C. Miller
2023-07-07 15:07:04 -06:00
parent 4891f37a45
commit a38b714667
58 changed files with 352 additions and 322 deletions

View File

@@ -112,19 +112,19 @@ sudo_ldap_match_netgroup(const char *triple, const char *host,
/* Parse host. */
cp = triple + 1;
ep = strchr(cp, ',');
if (ep == NULL || !sudo_ldap_netgroup_match_str(host, cp, ep - cp, true))
if (ep == NULL || !sudo_ldap_netgroup_match_str(host, cp, (size_t)(ep - cp), true))
debug_return_int(0);
/* Parse user. */
cp = ep + 1;
ep = strchr(cp, ',');
if (ep == NULL || !sudo_ldap_netgroup_match_str(user, cp, ep - cp, def_case_insensitive_user))
if (ep == NULL || !sudo_ldap_netgroup_match_str(user, cp, (size_t)(ep - cp), def_case_insensitive_user))
debug_return_int(0);
/* Parse domain. */
cp = ep + 1;
ep = strchr(cp, ')');
if (ep == NULL || !sudo_ldap_netgroup_match_str(domain, cp, ep - cp, true))
if (ep == NULL || !sudo_ldap_netgroup_match_str(domain, cp, (size_t)(ep - cp), true))
debug_return_int(0);
debug_return_int(1);