mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
systemd: use umask 022 for generated systemd units by lvm2-activation-generator
This commit is contained in:
parent
7d7c1f2025
commit
e9db11f387
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.107 -
|
Version 2.02.107 -
|
||||||
==================================
|
==================================
|
||||||
|
Use proper umask for systemd units generated by lvm2-activation-generator.
|
||||||
Check for failing mirror_remove_missing() function.
|
Check for failing mirror_remove_missing() function.
|
||||||
Prompt before converting volumes to thin pool and thin pool metadata.
|
Prompt before converting volumes to thin pool and thin pool metadata.
|
||||||
Add dumpconfig --type profilable-{metadata,command} to select profile type.
|
Add dumpconfig --type profilable-{metadata,command} to select profile type.
|
||||||
|
@ -170,6 +170,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const char *dir;
|
const char *dir;
|
||||||
int r = EXIT_SUCCESS;
|
int r = EXIT_SUCCESS;
|
||||||
|
mode_t old_mask;
|
||||||
|
|
||||||
kmsg_fd = open(KMSG_DEV_PATH, O_WRONLY|O_NOCTTY);
|
kmsg_fd = open(KMSG_DEV_PATH, O_WRONLY|O_NOCTTY);
|
||||||
|
|
||||||
@ -184,10 +185,13 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
dir = argv[1];
|
dir = argv[1];
|
||||||
|
|
||||||
|
/* mark lvm2-activation.*.service as world-accessible */
|
||||||
|
old_mask = umask(0022);
|
||||||
if (!generate_unit(dir, UNIT_EARLY) ||
|
if (!generate_unit(dir, UNIT_EARLY) ||
|
||||||
!generate_unit(dir, UNIT_MAIN) ||
|
!generate_unit(dir, UNIT_MAIN) ||
|
||||||
!generate_unit(dir, UNIT_NET))
|
!generate_unit(dir, UNIT_NET))
|
||||||
r = EXIT_FAILURE;
|
r = EXIT_FAILURE;
|
||||||
|
umask(old_mask);
|
||||||
out:
|
out:
|
||||||
if (r)
|
if (r)
|
||||||
kmsg(LOG_ERR, "LVM: Activation generator failed.\n");
|
kmsg(LOG_ERR, "LVM: Activation generator failed.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user