33 lines
1.6 KiB
Diff
33 lines
1.6 KiB
Diff
|
diff -up smartmontools-7.2/smartd.cpp.capnotify smartmontools-7.2/smartd.cpp
|
||
|
--- smartmontools-7.2/smartd.cpp.capnotify 2020-11-23 19:25:16.000000000 +0100
|
||
|
+++ smartmontools-7.2/smartd.cpp 2021-06-16 12:06:03.985526022 +0200
|
||
|
@@ -1020,6 +1020,8 @@ static void capabilities_drop_now()
|
||
|
capng_clear(CAPNG_SELECT_BOTH);
|
||
|
capng_updatev(CAPNG_ADD, (capng_type_t)(CAPNG_EFFECTIVE|CAPNG_PERMITTED),
|
||
|
CAP_SYS_ADMIN, CAP_MKNOD, CAP_SYS_RAWIO, -1);
|
||
|
+ capng_updatev(CAPNG_ADD, (capng_type_t)(CAPNG_BOUNDING_SET),
|
||
|
+ CAP_SETGID, CAP_SETUID, CAP_CHOWN, CAP_FOWNER, CAP_DAC_OVERRIDE, -1);
|
||
|
capng_apply(CAPNG_SELECT_BOTH);
|
||
|
}
|
||
|
|
||
|
@@ -1030,9 +1032,8 @@ static void capabilities_check_config(de
|
||
|
for (unsigned i = 0; i < configs.size(); i++) {
|
||
|
dev_config & cfg = configs[i];
|
||
|
if (!cfg.emailaddress.empty() || !cfg.emailcmdline.empty()) {
|
||
|
- PrintOut(LOG_INFO, "Device: %s, --capabilites is set, mail will be suppressed.\n",
|
||
|
+ PrintOut(LOG_INFO, "Device: %s, --capabilites is set, mail notification may not work.\n",
|
||
|
cfg.name.c_str());
|
||
|
- cfg.emailaddress.clear(); cfg.emailcmdline.clear();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@@ -1633,7 +1634,7 @@ static void Usage()
|
||
|
#ifdef HAVE_LIBCAP_NG
|
||
|
PrintOut(LOG_INFO," -C, --capabilities\n");
|
||
|
PrintOut(LOG_INFO," Drop unneeded Linux process capabilities.\n"
|
||
|
- " Warning: Mail notification does not work when used.\n\n");
|
||
|
+ " Warning: Mail notification may not work when used.\n\n");
|
||
|
#endif
|
||
|
PrintOut(LOG_INFO," -d, --debug\n");
|
||
|
PrintOut(LOG_INFO," Start smartd in debug mode\n\n");
|