Deleted Added
full compact
praliases.c (71348) praliases.c (73191)
1/*
1/*
2 * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
2 * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1983 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
14#ifndef lint
15static char copyright[] =
3 * All rights reserved.
4 * Copyright (c) 1983 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
14#ifndef lint
15static char copyright[] =
16"@(#) Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.\n\
16"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
17 All rights reserved.\n\
18 Copyright (c) 1983 Eric P. Allman. All rights reserved.\n\
19 Copyright (c) 1988, 1993\n\
20 The Regents of the University of California. All rights reserved.\n";
21#endif /* ! lint */
22
23#ifndef lint
17 All rights reserved.\n\
18 Copyright (c) 1983 Eric P. Allman. All rights reserved.\n\
19 Copyright (c) 1988, 1993\n\
20 The Regents of the University of California. All rights reserved.\n";
21#endif /* ! lint */
22
23#ifndef lint
24static char id[] = "@(#)$Id: praliases.c,v 8.59.4.15 2000/10/24 00:42:59 geir Exp $";
24static char id[] = "@(#)$Id: praliases.c,v 8.59.4.18 2001/01/22 19:00:18 gshapiro Exp $";
25#endif /* ! lint */
26
25#endif /* ! lint */
26
27/* $FreeBSD: head/contrib/sendmail/praliases/praliases.c 71348 2001-01-21 22:21:43Z gshapiro $ */
27/* $FreeBSD: head/contrib/sendmail/praliases/praliases.c 73191 2001-02-28 00:22:47Z gshapiro $ */
28
29#include <sys/types.h>
30#include <ctype.h>
31#include <stdlib.h>
32#include <unistd.h>
33#ifdef EX_OK
34# undef EX_OK /* unistd.h may have another use for this */
35#endif /* EX_OK */

--- 233 unchanged lines hidden (view full) ---

269
270 if (*db_name != '-')
271 break;
272 while (*db_name != '\0' &&
273 !(isascii(*db_name) && isspace(*db_name)))
274 db_name++;
275 }
276
28
29#include <sys/types.h>
30#include <ctype.h>
31#include <stdlib.h>
32#include <unistd.h>
33#ifdef EX_OK
34# undef EX_OK /* unistd.h may have another use for this */
35#endif /* EX_OK */

--- 233 unchanged lines hidden (view full) ---

269
270 if (*db_name != '-')
271 break;
272 while (*db_name != '\0' &&
273 !(isascii(*db_name) && isspace(*db_name)))
274 db_name++;
275 }
276
277 /* Skip non-file based DB types */
278 if (db_type != NULL && *db_type != '\0')
279 {
280 if (db_type != SMDB_TYPE_DEFAULT &&
281 strcmp(db_type, "hash") != 0 &&
282 strcmp(db_type, "btree") != 0 &&
283 strcmp(db_type, "dbm") != 0)
284 {
285 fprintf(stderr,
286 "praliases: Skipping non-file based alias type %s\n",
287 db_type);
288 return;
289 }
290 }
291
277 if (*db_name == '\0' || (db_type != NULL && *db_type == '\0'))
278 {
279 if (colon != NULL)
280 *colon = ':';
281 fprintf(stderr, "praliases: illegal alias specification: %s\n",
282 filename);
283 goto fatal;
284 }

--- 136 unchanged lines hidden ---
292 if (*db_name == '\0' || (db_type != NULL && *db_type == '\0'))
293 {
294 if (colon != NULL)
295 *colon = ':';
296 fprintf(stderr, "praliases: illegal alias specification: %s\n",
297 filename);
298 goto fatal;
299 }

--- 136 unchanged lines hidden ---