=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/parse.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/sudo/Attic/parse.c 2009/06/21 14:48:42 1.24 --- src/usr.bin/sudo/Attic/parse.c 2010/02/13 14:20:14 1.25 *************** *** 313,318 **** --- 313,320 ---- int nfound = 0; tq_foreach_fwd(&us->privileges, priv) { + if (hostlist_matches(&priv->hostlist) != ALLOW) + continue; tags.noexec = UNSPEC; tags.setenv = UNSPEC; tags.nopasswd = UNSPEC; *************** *** 364,369 **** --- 366,373 ---- int nfound = 0; tq_foreach_fwd(&us->privileges, priv) { + if (hostlist_matches(&priv->hostlist) != ALLOW) + continue; tags.noexec = UNSPEC; tags.setenv = UNSPEC; tags.nopasswd = UNSPEC; *************** *** 419,427 **** return(-1); tq_foreach_fwd(&userspecs, us) { ! /* XXX - why only check the first privilege here? */ ! if (userlist_matches(pw, &us->users) != ALLOW || ! hostlist_matches(&us->privileges.first->hostlist) != ALLOW) continue; if (long_list) --- 423,429 ---- return(-1); tq_foreach_fwd(&userspecs, us) { ! if (userlist_matches(pw, &us->users) != ALLOW) continue; if (long_list)