mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: fix errpath for control node creation
When control node failure happens, umask was not restored. Fix it by using common exit path.
This commit is contained in:
parent
df5c296426
commit
0e42b31dc3
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.143 -
|
Version 1.02.143 -
|
||||||
=================================
|
=================================
|
||||||
|
Restore umask when creation of node fails.
|
||||||
Add --concise to dmsetup create for many devices with tables in one command.
|
Add --concise to dmsetup create for many devices with tables in one command.
|
||||||
Accept minor number without major in library when it knows dm major number.
|
Accept minor number without major in library when it knows dm major number.
|
||||||
Introduce single-line concise table output format: dmsetup table --concise
|
Introduce single-line concise table output format: dmsetup table --concise
|
||||||
|
@ -293,13 +293,12 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor)
|
|||||||
if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR,
|
if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR,
|
||||||
MKDEV((dev_t)major, (dev_t)minor)) < 0) {
|
MKDEV((dev_t)major, (dev_t)minor)) < 0) {
|
||||||
log_sys_error("mknod", control);
|
log_sys_error("mknod", control);
|
||||||
(void) dm_prepare_selinux_context(NULL, 0);
|
ret = 0;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
umask(old_umask);
|
umask(old_umask);
|
||||||
(void) dm_prepare_selinux_context(NULL, 0);
|
(void) dm_prepare_selinux_context(NULL, 0);
|
||||||
|
|
||||||
return 1;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user