alias.c (66494) | alias.c (71345) |
---|---|
1/* 2 * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 */ 12 13#include <sendmail.h> 14 15#ifndef lint | 1/* 2 * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 */ 12 13#include <sendmail.h> 14 15#ifndef lint |
16static char id[] = "@(#)$Id: alias.c,v 8.142.4.3 2000/09/21 21:52:16 ca Exp $"; | 16static char id[] = "@(#)$Id: alias.c,v 8.142.4.9 2000/11/08 20:58:42 geir Exp $"; |
17#endif /* ! lint */ 18 19# define SEPARATOR ':' 20# define ALIAS_SPEC_SEPARATORS " ,/:" 21 22static MAP *AliasFileMap = NULL; /* the actual aliases.files map */ 23static int NAliasFileMaps; /* the number of entries in AliasFileMap */ 24 --- 249 unchanged lines hidden (view full) --- 274 return; 275 } 276 } 277 (void) snprintf(buf, sizeof buf, "Alias%d", NAliasFileMaps); 278 s = stab(buf, ST_MAP, ST_ENTER); 279 map = &s->s_map; 280 memset(map, '\0', sizeof *map); 281 map->map_mname = s->s_name; | 17#endif /* ! lint */ 18 19# define SEPARATOR ':' 20# define ALIAS_SPEC_SEPARATORS " ,/:" 21 22static MAP *AliasFileMap = NULL; /* the actual aliases.files map */ 23static int NAliasFileMaps; /* the number of entries in AliasFileMap */ 24 --- 249 unchanged lines hidden (view full) --- 274 return; 275 } 276 } 277 (void) snprintf(buf, sizeof buf, "Alias%d", NAliasFileMaps); 278 s = stab(buf, ST_MAP, ST_ENTER); 279 map = &s->s_map; 280 memset(map, '\0', sizeof *map); 281 map->map_mname = s->s_name; |
282 p = strpbrk(p,ALIAS_SPEC_SEPARATORS); | 282 p = strpbrk(p, ALIAS_SPEC_SEPARATORS); |
283 if (p != NULL && *p == SEPARATOR) 284 { 285 /* map name */ 286 *p++ = '\0'; 287 class = spec; 288 spec = p; 289 } 290 else --- 436 unchanged lines hidden (view full) --- 727 while (isascii(*p) && isspace(*p)) 728 p++; 729 rhs = p; 730 for (;;) 731 { 732 register char *nlp; 733 734 nlp = &p[strlen(p)]; | 283 if (p != NULL && *p == SEPARATOR) 284 { 285 /* map name */ 286 *p++ = '\0'; 287 class = spec; 288 spec = p; 289 } 290 else --- 436 unchanged lines hidden (view full) --- 727 while (isascii(*p) && isspace(*p)) 728 p++; 729 rhs = p; 730 for (;;) 731 { 732 register char *nlp; 733 734 nlp = &p[strlen(p)]; |
735 if (nlp[-1] == '\n') | 735 if (nlp > p && nlp[-1] == '\n') |
736 *--nlp = '\0'; 737 738 if (CheckAliases) 739 { 740 /* do parsing & compression of addresses */ 741 while (*p != '\0') 742 { 743 auto char *delimptr; --- 250 unchanged lines hidden --- | 736 *--nlp = '\0'; 737 738 if (CheckAliases) 739 { 740 /* do parsing & compression of addresses */ 741 while (*p != '\0') 742 { 743 auto char *delimptr; --- 250 unchanged lines hidden --- |