From e6c0ba72f3ef277da308bf473653ae5a78ba676d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 21 Nov 2007 18:50:47 +0000 Subject: [PATCH] s/setenv_ok/setenv_implied/g --- ldap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ldap.c b/ldap.c index 2af8ae5fd..9ebb998ab 100644 --- a/ldap.c +++ b/ldap.c @@ -276,10 +276,10 @@ sudo_ldap_check_runas(ld, entry) * Walk through search results and return TRUE if we have a command match. */ int -sudo_ldap_check_command(ld, entry, setenv_ok) +sudo_ldap_check_command(ld, entry, setenv_implied) LDAP *ld; LDAPMessage *entry; - int *setenv_ok; + int *setenv_implied; { char *allowed_cmnd, *allowed_args, **v = NULL, **p = NULL; int foundbang, ret = FALSE; @@ -293,8 +293,8 @@ sudo_ldap_check_command(ld, entry, setenv_ok) /* Match against ALL ? */ if (!strcmp(*p, "ALL")) { ret = TRUE; - if (setenv_ok != NULL) - *setenv_ok = TRUE; + if (setenv_implied != NULL) + *setenv_implied = TRUE; DPRINTF(("ldap sudoCommand '%s' ... MATCH!", *p), 2); continue; } @@ -1152,7 +1152,7 @@ sudo_ldap_check(v, pwflag) LDAPMessage *entry = NULL, *result = NULL; /* used for searches */ char *filt; /* used to parse attributes */ int do_netgr, rc, ret; /* temp/final return values */ - int setenv_ok; + int setenv_implied; int ldap_user_matches = FALSE, ldap_host_matches = FALSE; /* flags */ struct passwd *pw = list_pw ? list_pw : sudo_user.pw; @@ -1235,7 +1235,7 @@ sudo_ldap_check(v, pwflag) * user netgroups. Then we take the netgroups returned and * try to match them against the username. */ - setenv_ok = FALSE; + setenv_implied = FALSE; for (ret = 0, do_netgr = 0; !ret && do_netgr < 2; do_netgr++) { filt = do_netgr ? estrdup("sudoUser=+*") : sudo_ldap_build_pass1(pw); DPRINTF(("ldap search '%s'", filt), 1); @@ -1259,14 +1259,14 @@ sudo_ldap_check(v, pwflag) /* remember that host matched */ (ldap_host_matches = TRUE) && /* verify command match */ - sudo_ldap_check_command(ld, entry, &setenv_ok) && + sudo_ldap_check_command(ld, entry, &setenv_implied) && /* verify runas match */ sudo_ldap_check_runas(ld, entry) ) { /* We have a match! */ DPRINTF(("Perfect Match!"), 1); /* pick up any options */ - if (setenv_ok) + if (setenv_implied) def_setenv = TRUE; sudo_ldap_parse_options(ld, entry); /* make sure we don't reenter loop */ -- 2.40.0