mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.
This commit is contained in:
parent
f56007d95f
commit
c14f565d18
@ -1,5 +1,6 @@
|
||||
Version 1.02.61 -
|
||||
====================================
|
||||
Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.
|
||||
|
||||
Version 1.02.60 - 20th December 2010
|
||||
====================================
|
||||
|
@ -282,12 +282,14 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor)
|
||||
log_verbose("Creating device %s (%u, %u)", control, major, minor);
|
||||
|
||||
(void) dm_prepare_selinux_context(control, S_IFCHR);
|
||||
old_umask = umask(DM_CONTROL_NODE_UMASK);
|
||||
if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR,
|
||||
MKDEV(major, minor)) < 0) {
|
||||
log_sys_error("mknod", control);
|
||||
(void) dm_prepare_selinux_context(NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
umask(old_umask);
|
||||
(void) dm_prepare_selinux_context(NULL, 0);
|
||||
|
||||
return 1;
|
||||
|
@ -1219,6 +1219,7 @@ int dm_udev_complete(uint32_t cookie);
|
||||
int dm_udev_wait(uint32_t cookie);
|
||||
|
||||
#define DM_DEV_DIR_UMASK 0022
|
||||
#define DM_CONTROL_NODE_UMASK 0177
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user