1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.

This commit is contained in:
Peter Rajnoha 2011-01-04 14:43:53 +00:00
parent 9a09ca42d2
commit 8d5391f1c3
3 changed files with 4 additions and 0 deletions

View File

@ -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
====================================

View File

@ -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;

View File

@ -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
}