extend capability for smart check
This commit is contained in:
parent
6b054695f2
commit
5501583b47
@ -1,6 +1,6 @@
|
|||||||
diff -urp smartmontools-5.38.orig/configure.in smartmontools-5.38/configure.in
|
diff -up smartmontools-5.38/configure.in.lowcap smartmontools-5.38/configure.in
|
||||||
--- smartmontools-5.38.orig/configure.in 2009-08-16 07:42:57.000000000 -0400
|
--- smartmontools-5.38/configure.in.lowcap 2009-08-26 17:40:36.942297517 +0200
|
||||||
+++ smartmontools-5.38/configure.in 2009-08-21 12:07:15.000000000 -0400
|
+++ smartmontools-5.38/configure.in 2009-08-26 17:40:36.951298527 +0200
|
||||||
@@ -143,6 +143,40 @@ if test "$with_selinux" = "yes"; then
|
@@ -143,6 +143,40 @@ if test "$with_selinux" = "yes"; then
|
||||||
AC_DEFINE(WITH_SELINUX, [1], [Define to 1 if SELinux support is enabled])
|
AC_DEFINE(WITH_SELINUX, [1], [Define to 1 if SELinux support is enabled])
|
||||||
fi
|
fi
|
||||||
@ -42,9 +42,9 @@ diff -urp smartmontools-5.38.orig/configure.in smartmontools-5.38/configure.in
|
|||||||
if test "$prefix" = "NONE"; then
|
if test "$prefix" = "NONE"; then
|
||||||
dnl no prefix and no mandir, so use ${prefix}/share/man as default
|
dnl no prefix and no mandir, so use ${prefix}/share/man as default
|
||||||
if test "$mandir" = '${prefix}/man'; then
|
if test "$mandir" = '${prefix}/man'; then
|
||||||
diff -urp smartmontools-5.38.orig/Makefile.am smartmontools-5.38/Makefile.am
|
diff -up smartmontools-5.38/Makefile.am.lowcap smartmontools-5.38/Makefile.am
|
||||||
--- smartmontools-5.38.orig/Makefile.am 2009-08-16 07:42:57.000000000 -0400
|
--- smartmontools-5.38/Makefile.am.lowcap 2007-04-01 18:49:44.000000000 +0200
|
||||||
+++ smartmontools-5.38/Makefile.am 2009-08-21 11:28:22.000000000 -0400
|
+++ smartmontools-5.38/Makefile.am 2009-08-26 17:40:36.951298527 +0200
|
||||||
@@ -35,7 +35,7 @@ smartd_SOURCES = smartd.cpp \
|
@@ -35,7 +35,7 @@ smartd_SOURCES = smartd.cpp \
|
||||||
utility.cpp \
|
utility.cpp \
|
||||||
utility.h
|
utility.h
|
||||||
@ -54,9 +54,9 @@ diff -urp smartmontools-5.38.orig/Makefile.am smartmontools-5.38/Makefile.am
|
|||||||
smartd_DEPENDENCIES = @os_deps@
|
smartd_DEPENDENCIES = @os_deps@
|
||||||
|
|
||||||
EXTRA_smartd_SOURCES = os_darwin.cpp \
|
EXTRA_smartd_SOURCES = os_darwin.cpp \
|
||||||
diff -urp smartmontools-5.38.orig/smartd.cpp smartmontools-5.38/smartd.cpp
|
diff -up smartmontools-5.38/smartd.cpp.lowcap smartmontools-5.38/smartd.cpp
|
||||||
--- smartmontools-5.38.orig/smartd.cpp 2009-08-16 07:42:57.000000000 -0400
|
--- smartmontools-5.38/smartd.cpp.lowcap 2009-08-26 17:40:36.937297475 +0200
|
||||||
+++ smartmontools-5.38/smartd.cpp 2009-08-21 11:28:22.000000000 -0400
|
+++ smartmontools-5.38/smartd.cpp 2009-08-26 17:57:48.558423011 +0200
|
||||||
@@ -74,6 +74,10 @@ extern "C" int __stdcall FreeConsole(voi
|
@@ -74,6 +74,10 @@ extern "C" int __stdcall FreeConsole(voi
|
||||||
#include <io.h> // setmode()
|
#include <io.h> // setmode()
|
||||||
#endif // __CYGWIN__
|
#endif // __CYGWIN__
|
||||||
@ -76,8 +76,8 @@ diff -urp smartmontools-5.38.orig/smartd.cpp smartmontools-5.38/smartd.cpp
|
|||||||
+#ifdef HAVE_LIBCAP_NG
|
+#ifdef HAVE_LIBCAP_NG
|
||||||
+ // Drop capabilities
|
+ // Drop capabilities
|
||||||
+ capng_clear(CAPNG_SELECT_BOTH);
|
+ capng_clear(CAPNG_SELECT_BOTH);
|
||||||
+ capng_update(CAPNG_ADD, (capng_type_t)(CAPNG_EFFECTIVE|CAPNG_PERMITTED),
|
+ capng_updatev(CAPNG_ADD, (capng_type_t)(CAPNG_EFFECTIVE|CAPNG_PERMITTED),
|
||||||
+ CAP_SYS_ADMIN);
|
+ CAP_SYS_ADMIN, CAP_SYS_RAWIO, -1);
|
||||||
+ capng_apply(CAPNG_SELECT_BOTH);
|
+ capng_apply(CAPNG_SELECT_BOTH);
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Tools for monitoring SMART capable hard disks
|
Summary: Tools for monitoring SMART capable hard disks
|
||||||
Name: smartmontools
|
Name: smartmontools
|
||||||
Version: 5.38
|
Version: 5.38
|
||||||
Release: 15%{?dist}
|
Release: 16%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -79,6 +79,9 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
|
%config(noreplace) %{_sysconfdir}/sysconfig/smartmontools
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-16
|
||||||
|
- extend capability scanning devices
|
||||||
|
|
||||||
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-15
|
* Wed Aug 26 2009 Michal Hlavinka <mhlavink@redhat.com> - 1:5.38-15
|
||||||
- updated patch for lower capabilities (#517728)
|
- updated patch for lower capabilities (#517728)
|
||||||
- added buildrequires libcap-ng-devel
|
- added buildrequires libcap-ng-devel
|
||||||
|
Loading…
Reference in New Issue
Block a user