Introduce new_member_all() for code that doesn't include gram.h.

The ldap and sssd back-ends no longer require gram.h which fixes a
compilation issue with IBM LDAP.
This commit is contained in:
Todd C. Miller
2020-11-10 19:36:56 -07:00
parent deb217adf9
commit 55c4f3bddd
6 changed files with 24 additions and 8 deletions

View File

@@ -409,9 +409,8 @@ sudo_ldap_role_to_priv(const char *cn, void *hosts, void *runasusers,
if (hosts == NULL) {
/* The host has already matched, use ALL as wildcard. */
if ((m = calloc(1, sizeof(*m))) == NULL)
if ((m = new_member_all(NULL)) == NULL)
goto oom;
m->type = ALL;
TAILQ_INSERT_TAIL(&priv->hostlist, m, entries);
} else {
char *host;