+ struct cmndspec *cs;
+ struct member *m, *binding;
+ struct privilege *priv;
+ struct userspec *us;
+ struct defaults *d;
+ int atype, error = 0;
+
+ /* Forward check. */
+ tq_foreach_fwd(&userspecs, us) {
+ tq_foreach_fwd(&us->users, m) {
+ if (m->type == ALIAS) {
+ alias_seqno++;
+ if (find_alias(m->name, USERALIAS) == NULL) {
+ warningx("%s: User_Alias `%s' referenced but not defined",
+ strict ? "Error" : "Warning", m->name);
+ error++;
+ }
+ }
+ }
+ tq_foreach_fwd(&us->privileges, priv) {
+ tq_foreach_fwd(&priv->hostlist, m) {
+ if (m->type == ALIAS) {
+ alias_seqno++;
+ if (find_alias(m->name, HOSTALIAS) == NULL) {
+ warningx("%s: Host_Alias `%s' referenced but not defined",
+ strict ? "Error" : "Warning", m->name);
+ error++;
+ }
+ }
+ }
+ tq_foreach_fwd(&priv->cmndlist, cs) {
+ tq_foreach_fwd(&cs->runasuserlist, m) {
+ if (m->type == ALIAS) {
+ alias_seqno++;
+ if (find_alias(m->name, RUNASALIAS) == NULL) {
+ warningx("%s: Runas_Alias `%s' referenced but not defined",
+ strict ? "Error" : "Warning", m->name);
+ error++;
+ }
+ }
+ }
+ if ((m = cs->cmnd)->type == ALIAS) {
+ alias_seqno++;
+ if (find_alias(m->name, CMNDALIAS) == NULL) {
+ warningx("%s: Cmnd_Alias `%s' referenced but not defined",
+ strict ? "Error" : "Warning", m->name);
+ error++;
+ }
+ }
+ }
+ }
+ }