Commit b31f19e
[5.10] make it possible to specify permitted network port access at runtime (#7178)
Cherry-pick of #7151
motivation: The 'network' plugin permission in SwiftPM allows a plugin to request external network access to all or to a set of ports, but the command line flag does not allow to specify ports forcing users to allow all
changes:
* support passing ports to `local` and `all` --allow-network-connections flag
* write parsing logic to extract ports from `local:port,port,port` and `all:port,port,port`
* update remedy description to accurately specify the usage
* update tests
rdar://116241125
Co-authored-by: tomer doron <tomer@apple.com>1 parent a8d3aa5 commit b31f19e
File tree
2 files changed
+72
-12
lines changed- Sources/Commands/PackageTools
- Tests/CommandsTests
2 files changed
+72
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | | - | |
53 | | - | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
56 | 116 | | |
57 | 117 | | |
58 | 118 | | |
| |||
211 | 271 | | |
212 | 272 | | |
213 | 273 | | |
214 | | - | |
| 274 | + | |
215 | 275 | | |
216 | 276 | | |
217 | 277 | | |
| |||
377 | 437 | | |
378 | 438 | | |
379 | 439 | | |
380 | | - | |
381 | | - | |
| 440 | + | |
| 441 | + | |
382 | 442 | | |
383 | 443 | | |
384 | 444 | | |
| |||
387 | 447 | | |
388 | 448 | | |
389 | 449 | | |
390 | | - | |
391 | | - | |
| 450 | + | |
| 451 | + | |
392 | 452 | | |
393 | 453 | | |
394 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1936 | 1936 | | |
1937 | 1937 | | |
1938 | 1938 | | |
1939 | | - | |
| 1939 | + | |
1940 | 1940 | | |
1941 | 1941 | | |
1942 | 1942 | | |
1943 | 1943 | | |
1944 | | - | |
| 1944 | + | |
1945 | 1945 | | |
1946 | 1946 | | |
1947 | 1947 | | |
| |||
1952 | 1952 | | |
1953 | 1953 | | |
1954 | 1954 | | |
1955 | | - | |
| 1955 | + | |
1956 | 1956 | | |
1957 | 1957 | | |
1958 | 1958 | | |
1959 | 1959 | | |
1960 | | - | |
| 1960 | + | |
1961 | 1961 | | |
1962 | 1962 | | |
1963 | 1963 | | |
| |||
0 commit comments