ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_challenge.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_challenge.c (file contents):
Revision 1618 by michael, Tue Oct 30 21:04:38 2012 UTC vs.
Revision 1632 by michael, Sun Nov 4 15:37:10 2012 UTC

# Line 71 | Line 71 | m_challenge(struct Client *client_p, str
71              int parc, char *parv[])
72   {
73    char *challenge = NULL;
74 <  struct ConfItem *conf = NULL;
75 <  struct AccessItem *aconf = NULL;
74 >  struct MaskItem *conf = NULL;
75  
76    if (*parv[1] == '+')
77    {
# Line 89 | Line 88 | m_challenge(struct Client *client_p, str
88        return;
89      }
90      
91 <    conf = find_exact_name_conf(OPER_TYPE, source_p,
91 >    conf = find_exact_name_conf(CONF_OPER, source_p,
92                                  source_p->localClient->auth_oper, NULL, NULL);
93      if (conf == NULL)
94      {
# Line 124 | Line 123 | m_challenge(struct Client *client_p, str
123    source_p->localClient->response  = NULL;
124    source_p->localClient->auth_oper = NULL;
125  
126 <  if ((conf = find_conf_exact(OPER_TYPE,
127 <                              parv[1], source_p->username, source_p->host
128 <                              )) != NULL)
129 <    aconf = map_to_conf(conf);
130 <  else if ((conf = find_conf_exact(OPER_TYPE,
131 <                                   parv[1], source_p->username,
133 <                                   source_p->sockhost)) != NULL)
134 <    aconf = map_to_conf(conf);
126 >  if ((conf = find_conf_exact(CONF_OPER,
127 >                              parv[1], source_p->username, source_p->host)))
128 >    ;
129 >  else if ((conf = find_conf_exact(CONF_OPER, parv[1], source_p->username,
130 >                                   source_p->sockhost)))
131 >    ;
132  
133 <  if (aconf == NULL)
133 >  if (!conf)
134    {
135      sendto_one (source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name);
136 <    conf = find_exact_name_conf(OPER_TYPE, NULL, parv[1], NULL, NULL);
136 >    conf = find_exact_name_conf(CONF_OPER, NULL, parv[1], NULL, NULL);
137      failed_challenge_notice(source_p, parv[1], (conf != NULL)
138                              ? "host mismatch" : "no oper {} block");
139      return;
140    }
141  
142 <  if (aconf->rsa_public_key == NULL)
142 >  if (conf->rsa_public_key == NULL)
143    {
144      sendto_one (source_p, ":%s NOTICE %s :I'm sorry, PK authentication "
145                  "is not enabled for your oper{} block.", me.name,
# Line 151 | Line 148 | m_challenge(struct Client *client_p, str
148    }
149  
150    if (!generate_challenge(&challenge, &(source_p->localClient->response),
151 <                          aconf->rsa_public_key))
151 >                          conf->rsa_public_key))
152      sendto_one(source_p, form_str(RPL_RSACHALLENGE),
153                 me.name, source_p->name, challenge);
154  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)