Skip to content

Commit e2f8767

Browse files
author
Kristina Hanicova
committed
meson: Fix mode variable to be a string
This way we do not risk it being converted into decimal 448 or octal 700 without the leading zero. Fixes: #983.
1 parent e3a008f commit e2f8767

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ default_int_options = [
4848
'default-luks1-keybits',
4949
'default-luks2-iter-time',
5050
'default-luks2-keyslot-keybits',
51-
'default-luks2-lock-dir-perms',
5251
'default-luks2-memory-kb',
5352
'default-luks2-parallel-threads',
5453
'default-passphrase-size-max',
@@ -67,6 +66,8 @@ foreach default_option : (default_int_options)
6766
conf.set(default_option.underscorify().to_upper(), get_option(default_option))
6867
endforeach
6968

69+
conf.set('DEFAULT_LUKS2_LOCK_DIR_PERMS', get_option('default-luks2-lock-dir-perms'))
70+
7071
sanitizer = get_option('b_sanitize')
7172
sanitizer_enabled = sanitizer != '' and sanitizer != 'none'
7273

meson_options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ option('default-luks1-mode', type : 'string', description : 'cipher mode for LUK
1515
option('default-luks2-iter-time', type : 'integer', description : 'Argon2 PBKDF iteration time for LUKS2 (in ms)', value : 2000)
1616
option('default-luks2-keyslot-cipher', type : 'string', description : 'fallback cipher for LUKS2 keyslot (if data encryption is incompatible)', value : 'aes-xts-plain64')
1717
option('default-luks2-keyslot-keybits', type : 'integer', description : 'fallback key size for LUKS2 keyslot (if data encryption is incompatible)', value : 512)
18-
option('default-luks2-lock-dir-perms', type : 'integer', description : 'default luks2 locking directory permissions', value : 0o700)
18+
option('default-luks2-lock-dir-perms', type : 'string', description : 'default LUKS2 locking directory permissions', value : '0700')
1919
option('default-luks2-lock-path', type : 'string', description : 'path to directory for LUKSv2 locks', value : '/run/cryptsetup')
2020
option('default-luks2-memory-kb', type : 'integer', description : 'Argon2 PBKDF memory cost for LUKS2 (in kB)', value : 1048576)
2121
option('default-luks2-parallel-threads', type : 'integer', description : 'Argon2 PBKDF max parallel cost for LUKS2 (if CPUs available)', value : 4)

0 commit comments

Comments
 (0)