| @@ -1,24 +1,24 @@ | | | @@ -1,24 +1,24 @@ |
1 | /* $NetBSD: config.c,v 1.1 2008/03/13 16:35:30 joerg Exp $ */ | | 1 | /* $NetBSD: config.c,v 1.2 2008/03/21 08:18:17 jklos Exp $ */ |
2 | | | 2 | |
3 | #if HAVE_CONFIG_H | | 3 | #if HAVE_CONFIG_H |
4 | #include "config.h" | | 4 | #include "config.h" |
5 | #endif | | 5 | #endif |
6 | #include <nbcompat.h> | | 6 | #include <nbcompat.h> |
7 | #if HAVE_SYS_CDEFS_H | | 7 | #if HAVE_SYS_CDEFS_H |
8 | #include <sys/cdefs.h> | | 8 | #include <sys/cdefs.h> |
9 | #endif | | 9 | #endif |
10 | #ifndef lint | | 10 | #ifndef lint |
11 | __RCSID("$NetBSD: config.c,v 1.1 2008/03/13 16:35:30 joerg Exp $"); | | 11 | __RCSID("$NetBSD: config.c,v 1.2 2008/03/21 08:18:17 jklos Exp $"); |
12 | #endif | | 12 | #endif |
13 | | | 13 | |
14 | /*- | | 14 | /*- |
15 | * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. | | 15 | * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. |
16 | * All rights reserved. | | 16 | * All rights reserved. |
17 | * | | 17 | * |
18 | * Redistribution and use in source and binary forms, with or without | | 18 | * Redistribution and use in source and binary forms, with or without |
19 | * modification, are permitted provided that the following conditions | | 19 | * modification, are permitted provided that the following conditions |
20 | * are met: | | 20 | * are met: |
21 | * | | 21 | * |
22 | * 1. Redistributions of source code must retain the above copyright | | 22 | * 1. Redistributions of source code must retain the above copyright |
23 | * notice, this list of conditions and the following disclaimer. | | 23 | * notice, this list of conditions and the following disclaimer. |
24 | * 2. Redistributions in binary form must reproduce the above copyright | | 24 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -40,26 +40,27 @@ __RCSID("$NetBSD: config.c,v 1.1 2008/03 | | | @@ -40,26 +40,27 @@ __RCSID("$NetBSD: config.c,v 1.1 2008/03 |
40 | * SUCH DAMAGE. | | 40 | * SUCH DAMAGE. |
41 | */ | | 41 | */ |
42 | | | 42 | |
43 | #if HAVE_ERR_H | | 43 | #if HAVE_ERR_H |
44 | #include <err.h> | | 44 | #include <err.h> |
45 | #endif | | 45 | #endif |
46 | #if HAVE_STRING_H | | 46 | #if HAVE_STRING_H |
47 | #include <string.h> | | 47 | #include <string.h> |
48 | #endif | | 48 | #endif |
49 | | | 49 | |
50 | #include "admin.h" | | 50 | #include "admin.h" |
51 | #include "lib.h" | | 51 | #include "lib.h" |
52 | | | 52 | |
| | | 53 | const char *gpg_cmd; |
53 | const char *pkg_vulnerabilities_dir; | | 54 | const char *pkg_vulnerabilities_dir; |
54 | const char *pkg_vulnerabilities_file; | | 55 | const char *pkg_vulnerabilities_file; |
55 | const char *pkg_vulnerabilities_url; | | 56 | const char *pkg_vulnerabilities_url; |
56 | const char *fetch_cmd = FTP_CMD; | | 57 | const char *fetch_cmd = FTP_CMD; |
57 | const char *ignore_advisories = NULL; | | 58 | const char *ignore_advisories = NULL; |
58 | const char tnf_vulnerability_base[] = "ftp://ftp.NetBSD.org/pub/NetBSD/packages/vulns"; | | 59 | const char tnf_vulnerability_base[] = "ftp://ftp.NetBSD.org/pub/NetBSD/packages/vulns"; |
59 | | | 60 | |
60 | static struct config_variable { | | 61 | static struct config_variable { |
61 | const char *name; | | 62 | const char *name; |
62 | const char **var; | | 63 | const char **var; |
63 | } config_variables[] = { | | 64 | } config_variables[] = { |
64 | { "GPG", &gpg_cmd }, | | 65 | { "GPG", &gpg_cmd }, |
65 | { "PKGVULNDIR", &pkg_vulnerabilities_dir }, | | 66 | { "PKGVULNDIR", &pkg_vulnerabilities_dir }, |