|
|
73ea64 |
diff -up smartmontools-7.2/os_linux.cpp.permsfix smartmontools-7.2/os_linux.cpp
|
|
|
73ea64 |
--- smartmontools-7.2/os_linux.cpp.permsfix 2021-11-02 22:08:51.956425716 +0100
|
|
|
73ea64 |
+++ smartmontools-7.2/os_linux.cpp 2021-11-02 22:09:55.928583584 +0100
|
|
|
73ea64 |
@@ -1022,7 +1022,7 @@ bool linux_aacraid_device::open()
|
|
|
73ea64 |
return set_err(ENOENT, "aac entry not found in /proc/devices");
|
|
|
73ea64 |
|
|
|
73ea64 |
//Create misc device file in /dev/ used for communication with driver
|
|
|
73ea64 |
- if(mknod(dev_name,S_IFCHR,makedev(mjr,aHost)))
|
|
|
73ea64 |
+ if(mknod(dev_name,S_IFCHR|0600,makedev(mjr,aHost)))
|
|
|
73ea64 |
return set_err(errno,"cannot create %s:%s",dev_name,strerror(errno));
|
|
|
73ea64 |
|
|
|
73ea64 |
afd = ::open(dev_name,O_RDWR);
|
|
|
73ea64 |
@@ -1298,14 +1298,14 @@ bool linux_megaraid_device::open()
|
|
|
73ea64 |
while (fgets(line, sizeof(line), fp) != NULL) {
|
|
|
73ea64 |
int n1 = 0;
|
|
|
73ea64 |
if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) {
|
|
|
73ea64 |
- n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR, makedev(mjr, 0));
|
|
|
73ea64 |
+ n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR|0600, makedev(mjr, 0));
|
|
|
73ea64 |
if(report > 0)
|
|
|
73ea64 |
pout("Creating /dev/megaraid_sas_ioctl_node = %d\n", n1 >= 0 ? 0 : errno);
|
|
|
73ea64 |
if (n1 >= 0 || errno == EEXIST)
|
|
|
73ea64 |
break;
|
|
|
73ea64 |
}
|
|
|
73ea64 |
else if (sscanf(line, "%d megadev%n", &mjr, &n1) == 1 && n1 == 11) {
|
|
|
73ea64 |
- n1=mknod("/dev/megadev0", S_IFCHR, makedev(mjr, 0));
|
|
|
73ea64 |
+ n1=mknod("/dev/megadev0", S_IFCHR|0600, makedev(mjr, 0));
|
|
|
73ea64 |
if(report > 0)
|
|
|
73ea64 |
pout("Creating /dev/megadev0 = %d\n", n1 >= 0 ? 0 : errno);
|
|
|
73ea64 |
if (n1 >= 0 || errno == EEXIST)
|
|
|
73ea64 |
@@ -2970,7 +2970,7 @@ bool linux_smart_interface::get_dev_mega
|
|
|
73ea64 |
n1=0;
|
|
|
73ea64 |
if (sscanf(line, "%d megaraid_sas_ioctl%n", &mjr, &n1) == 1 && n1 == 22) {
|
|
|
73ea64 |
scan_megasas = true;
|
|
|
73ea64 |
- n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR, makedev(mjr, 0));
|
|
|
73ea64 |
+ n1=mknod("/dev/megaraid_sas_ioctl_node", S_IFCHR|0600, makedev(mjr, 0));
|
|
|
73ea64 |
if(scsi_debugmode > 0)
|
|
|
73ea64 |
pout("Creating /dev/megaraid_sas_ioctl_node = %d\n", n1 >= 0 ? 0 : errno);
|
|
|
73ea64 |
if (n1 >= 0 || errno == EEXIST)
|