/[imapfilter]/imapfilter/account.c
ViewVC logotype

Diff of /imapfilter/account.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by lefcha, Fri Feb 13 23:44:50 2004 UTC revision 1.12 by lefcha, Sat Feb 14 19:14:43 2004 UTC
# Line 68  set_account(char *line, regmatch_t * m) Line 68  set_account(char *line, regmatch_t * m)
68          init_account(a);          init_account(a);
69    
70          strncat(a->key, line + m[1].rm_so, min(m[1].rm_eo - m[1].rm_so,          strncat(a->key, line + m[1].rm_so, min(m[1].rm_eo - m[1].rm_so,
71                  KEY_LEN - 1));              KEY_LEN - 1));
72    
73          debug("account: '%s'\n", a->key);          debug("account: '%s'\n", a->key);
74    
# Line 99  set_account(char *line, regmatch_t * m) Line 99  set_account(char *line, regmatch_t * m)
99          } else          } else
100                  flags |= FLAG_BLANKPASS;                  flags |= FLAG_BLANKPASS;
101    
102          strncat(a->server, line + m[6].rm_so,          strncat(a->server, line + m[6].rm_so, min(m[6].rm_eo - m[6].rm_so,
103              min(m[6].rm_eo - m[6].rm_so, SERVER_LEN - 1));              SERVER_LEN - 1));
104    
105          debug("server: '%s'\n", a->server);          debug("server: '%s'\n", a->server);
106    
# Line 140  find_password(char *user, char *serv) Line 140  find_password(char *user, char *serv)
140    
141          for (a = accounts; a != NULL; a = a->next)          for (a = accounts; a != NULL; a = a->next)
142                  if (a->pass_attr == PASS_ATTR_NONE &&                  if (a->pass_attr == PASS_ATTR_NONE &&
143                      !strcmp(a->server, serv) &&                      !strcmp(a->server, serv) && !strcmp(a->user, user)) {
                     !strcmp(a->user, user)) {  
144                          a->pass_attr = PASS_ATTR_CRYPT;                          a->pass_attr = PASS_ATTR_CRYPT;
145                          return a->pass;                          return a->pass;
146                  }                  }
# Line 183  set_mboxgrp(char *line, regmatch_t * m) Line 182  set_mboxgrp(char *line, regmatch_t * m)
182          init_mboxgrp(g);          init_mboxgrp(g);
183    
184          strncat(g->key, line + m[1].rm_so, min(m[1].rm_eo - m[1].rm_so,          strncat(g->key, line + m[1].rm_so, min(m[1].rm_eo - m[1].rm_so,
185                  KEY_LEN - 1));              KEY_LEN - 1));
186    
187          debug("folder: '%s'\n", g->key);          debug("folder: '%s'\n", g->key);
188    
189          strncat(mboxs, line + m[2].rm_so, min(m[2].rm_eo - m[2].rm_so,          strncat(mboxs, line + m[2].rm_so, min(m[2].rm_eo - m[2].rm_so,
190                  LINE_MAX - 1));              LINE_MAX - 1));
191    
192          process_mboxgrp(g, mboxs);          process_mboxgrp(g, mboxs);
193    
# Line 199  set_mboxgrp(char *line, regmatch_t * m) Line 198  set_mboxgrp(char *line, regmatch_t * m)
198    
199    
200  /*  /*
201   * Calls set_mbox() in order to create mailboxes that are part of   * Calls set_mbox() in order to create mailboxes that are part of the
202   * the mailbox-group.   * mailbox-group.
203   */   */
204  void  void
205  process_mboxgrp(mboxgrp_t * g, char *mboxs)  process_mboxgrp(mboxgrp_t * g, char *mboxs)
# Line 290  string_decode(char *str) Line 289  string_decode(char *str)
289                          hex[2] = '\0';                          hex[2] = '\0';
290    
291                          if (!isprint((unsigned char)(*str = (char)strtoul(hex,                          if (!isprint((unsigned char)(*str = (char)strtoul(hex,
292                                          NULL, 16))))                              NULL, 16))))
293                                  return ERROR_PARSER;                                  return ERROR_PARSER;
294    
295                          str++;                          str++;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26