Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
lvm2.631
systemd-use-umask-022-for-generated-systemd-uni...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File systemd-use-umask-022-for-generated-systemd-units-by.patch of Package lvm2.631
From e9db11f387086787fb1aad5a853990e9e6034ad5 Mon Sep 17 00:00:00 2001 From: Dongmao Zhang <dmzhang@suse.com> Date: Wed, 21 May 2014 10:10:24 +0200 Subject: systemd: use umask 022 for generated systemd units by lvm2-activation-generator Git-repo: https://git.fedorahosted.org/git/lvm2.git Git-commit: e9db11f387086787fb1aad5a853990e9e6034ad5 --- scripts/lvm2_activation_generator_systemd_red_hat.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c index e39f901..6a003f5 100644 --- a/scripts/lvm2_activation_generator_systemd_red_hat.c +++ b/scripts/lvm2_activation_generator_systemd_red_hat.c @@ -145,6 +145,7 @@ int main(int argc, char *argv[]) { const char *dir; int r = EXIT_SUCCESS; + mode_t old_mask; kmsg_fd = open(KMSG_DEV_PATH, O_WRONLY|O_NOCTTY); @@ -158,9 +159,13 @@ int main(int argc, char *argv[]) goto out; dir = argc > 1 ? argv[1] : DEFAULT_UNIT_DIR; - + + /* mark lvm2-activation.*.service as world-accessible */ + old_mask = umask(0022); if (!generate_unit(dir, 1) || !generate_unit(dir, 0)) r = EXIT_FAILURE; + umask(old_mask); + out: if (r) kmsg("LVM: Activation generator failed.\n");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor