/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
Copyright (C) 2012 Roberto Sassu - Politecnico di Torino, Italy
TORSEC group -- http://security.polito.it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
#include <unistd.h>
#include "fd-util.h"
#include "fileio.h"
#include "ima-setup.h"
#include "log.h"
#include "util.h"
int ima_setup(void) {
#ifdef HAVE_IMA
unsigned lineno = 0;
log_debug("IMA support is disabled in the kernel, ignoring.");
return 0;
}
if (!input) {
return 0;
}
log_warning("Another IMA custom policy has already been loaded, ignoring.");
return 0;
}
if (imafd < 0) {
return 0;
}
lineno++;
lineno);
}
#endif /* HAVE_IMA */
return 0;
}