pmcf 6.68.13 → 6.68.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/services/chrony.mjs +4 -4
- package/src/subnet.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.68.
|
|
3
|
+
"version": "6.68.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"content-entry-transform": "^1.7.11",
|
|
55
55
|
"filtered-map": "^1.0.0",
|
|
56
56
|
"ip-utilties": "^3.13.1",
|
|
57
|
-
"npm-pkgbuild": "^22.2.
|
|
57
|
+
"npm-pkgbuild": "^22.2.19",
|
|
58
58
|
"pacc": "^14.3.0",
|
|
59
59
|
"package-directory": "^8.2.0",
|
|
60
60
|
"yaml": "^2.9.1"
|
package/src/services/chrony.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import { default_collection_attribute_writable, asArray } from "pacc";
|
|
2
|
+
import { default_collection_attribute_writable, leafValues, asArray } from "pacc";
|
|
3
3
|
import { addType, CoreService } from "pmcf";
|
|
4
4
|
import { writeLines } from "../utils.mjs";
|
|
5
5
|
import { FAMILY_UNIX, FAMILY_IPV4_IPV6, PROTOCOL_TCP } from "../constants.mjs";
|
|
@@ -41,7 +41,7 @@ export class chrony extends CoreService {
|
|
|
41
41
|
|
|
42
42
|
async *preparePackages(dir) {
|
|
43
43
|
const packageData = await this.preparePackage(dir);
|
|
44
|
-
const
|
|
44
|
+
const addresses = [...new Set(leafValues(this.subnets).map(s=>s.address))];
|
|
45
45
|
const host = this.host;
|
|
46
46
|
|
|
47
47
|
function chronyServer(endpoint) {
|
|
@@ -74,9 +74,9 @@ export class chrony extends CoreService {
|
|
|
74
74
|
"ntsdumpdir /var/lib/chrony",
|
|
75
75
|
"dumpdir /var/lib/chrony",
|
|
76
76
|
"pidfile /run/chrony/chronyd.pid",
|
|
77
|
-
|
|
77
|
+
addresses.map(address => `allow ${address}`),
|
|
78
78
|
"cmdratelimit interval -4 burst 16",
|
|
79
|
-
|
|
79
|
+
addresses.map(address => `cmdallow ${address}`)
|
|
80
80
|
];
|
|
81
81
|
|
|
82
82
|
await writeLines(join(dir, "etc"), "chrony.conf", lines);
|
package/src/subnet.mjs
CHANGED
|
@@ -89,5 +89,5 @@ export class Subnet extends core {
|
|
|
89
89
|
|
|
90
90
|
export const SUBNET_GLOBAL_IPV4 = new Subnet(undefined, "0.0.0.0/0");
|
|
91
91
|
export const SUBNET_GLOBAL_IPV6 = new Subnet(undefined, "::0/0");
|
|
92
|
-
export const SUBNET_LOCALHOST_IPV4 = new Subnet(undefined, "127.0.0.
|
|
92
|
+
export const SUBNET_LOCALHOST_IPV4 = new Subnet(undefined, "127.0.0.0/8");
|
|
93
93
|
export const SUBNET_LOCALHOST_IPV6 = new Subnet(undefined, "::1/128");
|