mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.
This commit is contained in:
parent
9a09ca42d2
commit
8d5391f1c3
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.61 -
|
Version 1.02.61 -
|
||||||
====================================
|
====================================
|
||||||
|
Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.
|
||||||
|
|
||||||
Version 1.02.60 - 20th December 2010
|
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);
|
log_verbose("Creating device %s (%u, %u)", control, major, minor);
|
||||||
|
|
||||||
(void) dm_prepare_selinux_context(control, S_IFCHR);
|
(void) dm_prepare_selinux_context(control, S_IFCHR);
|
||||||
|
old_umask = umask(DM_CONTROL_NODE_UMASK);
|
||||||
if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR,
|
if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR,
|
||||||
MKDEV(major, minor)) < 0) {
|
MKDEV(major, minor)) < 0) {
|
||||||
log_sys_error("mknod", control);
|
log_sys_error("mknod", control);
|
||||||
(void) dm_prepare_selinux_context(NULL, 0);
|
(void) dm_prepare_selinux_context(NULL, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
umask(old_umask);
|
||||||
(void) dm_prepare_selinux_context(NULL, 0);
|
(void) dm_prepare_selinux_context(NULL, 0);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1219,6 +1219,7 @@ int dm_udev_complete(uint32_t cookie);
|
|||||||
int dm_udev_wait(uint32_t cookie);
|
int dm_udev_wait(uint32_t cookie);
|
||||||
|
|
||||||
#define DM_DEV_DIR_UMASK 0022
|
#define DM_DEV_DIR_UMASK 0022
|
||||||
|
#define DM_CONTROL_NODE_UMASK 0177
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user