mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-07-03 22:23:16 +02:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
76f3496455 | |||
dc36ed86d3 | |||
de89119dbf | |||
04e3ff3ef5 | |||
5769fb1833 | |||
52960f8b93 | |||
e576ac9771 | |||
d61b9c0be7 | |||
1e2934d9a3 | |||
c13fce4028 | |||
aa2f6e9b63 | |||
ff071501d0 | |||
f2b486e053 | |||
e3f11d343a | |||
7e89de565e | |||
e91cb01e9a | |||
b0966fd243 | |||
0b197c4d30 |
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2012-04-05 Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||||
|
|
||||||
|
version 0.2
|
||||||
|
* added RPM & TAR building makefile rules
|
||||||
|
* renamed evm-utils to ima-evm-utils
|
||||||
|
* added command options description
|
||||||
|
* updated error handling
|
||||||
|
* refactored redundant code
|
||||||
|
|
||||||
|
2012-04-02 Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||||
|
|
||||||
|
version 0.1.0
|
||||||
|
* Fully functional version for lastest 3.x kernels
|
||||||
|
|
||||||
2011-08-24 Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
2011-08-24 Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||||
|
|
||||||
version 0.1
|
version 0.1
|
||||||
|
17
Makefile.am
17
Makefile.am
@ -4,3 +4,20 @@ SUBDIRS = src tests
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
SRCS = $(HOME)/rpmbuild/SOURCES
|
||||||
|
SPEC = $(PACKAGE_NAME).spec
|
||||||
|
|
||||||
|
pkgname = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
||||||
|
tarname = $(pkgname).tar.gz
|
||||||
|
|
||||||
|
$(tarname):
|
||||||
|
git tag -f v$(PACKAGE_VERSION)
|
||||||
|
git archive --format=tar --prefix=$(pkgname)/ v$(PACKAGE_VERSION) $(FILES) | gzip >$@;
|
||||||
|
|
||||||
|
tar: $(tarname)
|
||||||
|
|
||||||
|
rpm: $(tarname)
|
||||||
|
cp $(tarname) $(SRCS)/
|
||||||
|
rpmbuild -ba --nodeps $(SPEC)
|
||||||
|
|
||||||
|
.PHONY: $(tarname)
|
||||||
|
12
README
12
README
@ -1,8 +1,17 @@
|
|||||||
|
|
||||||
1. Generate private key
|
1. Generate private key
|
||||||
|
|
||||||
|
# plain key
|
||||||
openssl genrsa -out privkey_evm.pem 1024
|
openssl genrsa -out privkey_evm.pem 1024
|
||||||
|
|
||||||
|
# encrypted key
|
||||||
|
openssl genrsa -des3 -out privkey_evm.pem 1024
|
||||||
|
|
||||||
|
# set password for the key
|
||||||
|
openssl rsa -in /etc/keys/privkey_evm.pem -out privkey_evm_enc.pem -des3
|
||||||
|
or
|
||||||
|
openssl pkcs8 -topk8 -in /etc/keys/privkey_evm.pem -out privkey_evm_enc.pem
|
||||||
|
|
||||||
2. Generate public key
|
2. Generate public key
|
||||||
|
|
||||||
openssl rsa -pubout -in privkey_evm.pem -out pubkey_evm.pem
|
openssl rsa -pubout -in privkey_evm.pem -out pubkey_evm.pem
|
||||||
@ -34,6 +43,9 @@ find /lib/modules ! -name "*.ko" -type f -uid 0 -exec evmctl sign --imahash '{}'
|
|||||||
# security.ima needs to have signature for modules
|
# security.ima needs to have signature for modules
|
||||||
find /lib/modules -name "*.ko" -type f -uid 0 -exec evmctl sign --imasig '{}' \;
|
find /lib/modules -name "*.ko" -type f -uid 0 -exec evmctl sign --imasig '{}' \;
|
||||||
|
|
||||||
|
# generate signatures in .sig files
|
||||||
|
find /lib/modules -name "*.ko" -type f -uid 0 -exec evmctl -n --sigfile ima_sign '{}' \;
|
||||||
|
|
||||||
8. Label filesystem in fix mode...
|
8. Label filesystem in fix mode...
|
||||||
|
|
||||||
ima_fix_dir.sh <dir>
|
ima_fix_dir.sh <dir>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# autoconf script
|
# autoconf script
|
||||||
|
|
||||||
AC_PREREQ([2.65])
|
AC_PREREQ([2.65])
|
||||||
AC_INIT(evm-utils, 0.1, dmitry.kasatkin@intel.com)
|
AC_INIT(ima-evm-utils, 0.2, dmitry.kasatkin@intel.com)
|
||||||
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
@ -33,7 +33,7 @@ AC_CHECK_HEADERS(openssl/conf.h)
|
|||||||
#debug support - yes for a while
|
#debug support - yes for a while
|
||||||
PKG_ARG_ENABLE(debug, "yes", DEBUG, [Enable Debug support])
|
PKG_ARG_ENABLE(debug, "yes", DEBUG, [Enable Debug support])
|
||||||
if test $pkg_cv_enable_debug = yes; then
|
if test $pkg_cv_enable_debug = yes; then
|
||||||
CFLAGS="-g -O1 -Wall -Wstrict-prototypes -pipe"
|
CFLAGS="$CFLAGS -g -O1 -Wall -Wstrict-prototypes -pipe"
|
||||||
else
|
else
|
||||||
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -pipe -fomit-frame-pointer"
|
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -pipe -fomit-frame-pointer"
|
||||||
fi
|
fi
|
||||||
@ -47,7 +47,7 @@ fi
|
|||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
evm-utils.spec
|
ima-evm-utils.spec
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Name: @PACKAGE_NAME@
|
Name: @PACKAGE_NAME@
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PACKAGE_VERSION@
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: evm-utils - IMA/EVM support utilities
|
Summary: @PACKAGE_NAME@ - IMA/EVM control utility
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
#URL:
|
#URL:
|
||||||
@ -12,11 +12,10 @@ BuildRequires: autoconf
|
|||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
BuildRequires: readline-devel
|
|
||||||
BuildRequires: keyutils-libs-devel
|
BuildRequires: keyutils-libs-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This library provides EVM support utilities.
|
This package provide IMA/EVM control utility
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -48,6 +47,6 @@ exit 0
|
|||||||
%{_libdir}/*
|
%{_libdir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 20 2011 Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
* Thu Apr 05 2012 Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||||
- Initial package for MeeGo
|
- Initial RPM spec file
|
||||||
|
|
522
src/evmctl.c
522
src/evmctl.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user