inherit other fields

I think this is all that need to be inherited.
This commit is contained in:
Joey Hess 2019-10-10 16:10:12 -04:00
parent c3975ff3b4
commit df5b0ffab3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 40 additions and 13 deletions

View file

@ -39,10 +39,34 @@ autoEnableField = "autoenable"
encryptionField :: RemoteConfigField
encryptionField = "encryption"
macField :: RemoteConfigField
macField = "mac"
cipherField :: RemoteConfigField
cipherField = "cipher"
cipherkeysField :: RemoteConfigField
cipherkeysField = "cipher"
pubkeysField :: RemoteConfigField
pubkeysField = "pubkeys"
chunksizeField :: RemoteConfigField
chunksizeField = "chunksize"
{- A remote with sameas-uuid set will inherit these values from the config
- of that uuid. These values cannot be overridden. -}
sameasInherits :: S.Set RemoteConfigField
sameasInherits = S.fromList
-- encryption configuration is necessarily the same for two
-- remotes that access the same data store
[ encryptionField
-- TODO more encryption related fields
, macField
, cipherField
, cipherkeysField
, pubkeysField
-- legacy chunking was either enabled or not, so has to be the same
-- across configs for remotes that access the same data
-- (new-style chunking does not have that limitation)
, chunksizeField
]