rename config to annex.security.allowed-compute-programs

And require for enable as well as autoenable.

It seemed asking for trouble for `git-annex enable foo` to use whatever
compute program is stored in the git config, without verifying that the
user wants that program to be used.

Note that it would be good to allow `git-annex enable foo program=...`
to be used without the program being in the git config. Not implemented yet
though.
This commit is contained in:
Joey Hess 2025-03-03 16:07:04 -04:00
parent f32d2aecce
commit 52f51d065a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 24 additions and 24 deletions

View file

@ -146,7 +146,7 @@ data GitConfig = GitConfig
, annexAllowedUrlSchemes :: S.Set Scheme
, annexAllowedIPAddresses :: String
, annexAllowUnverifiedDownloads :: Bool
, annexAutoEnableComputePrograms :: Maybe String
, annexAllowedComputePrograms :: Maybe String
, annexMaxExtensionLength :: Maybe Int
, annexMaxExtensions :: Maybe Int
, annexJobs :: Concurrency
@ -262,8 +262,8 @@ extractGitConfig configsource r = GitConfig
getmaybe (annexConfig "security.allowed-http-addresses") -- old name
, annexAllowUnverifiedDownloads = (== Just "ACKTHPPT") $
getmaybe (annexConfig "security.allow-unverified-downloads")
, annexAutoEnableComputePrograms =
getmaybe (annexConfig "security.autoenable-compute-programs")
, annexAllowedComputePrograms =
getmaybe (annexConfig "security.allowed-compute-programs")
, annexMaxExtensionLength = getmayberead (annexConfig "maxextensionlength")
, annexMaxExtensions = getmayberead (annexConfig "maxextensions")
, annexJobs = fromMaybe NonConcurrent $