/** * Author: Sumit Bose * * Copyright (C) 2008 Red Hat * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; version 2 only * * This program 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 this program; see the file COPYING.LGPL. If not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ #define _GNU_SOURCE #include #include #include "helpers.h" #include "util.h" #include "xml_helper.h" #include "ipaaction.h" #include "output_handler.h" int main(int argc, char **argv) { char *xslt_file_name; char *ipa_policy_type; char *policy_file_name; if (argc != 2) { DEBUG(0, ("missing or to many arguments, I expect a single filename!\n")); exit(1); } policy_file_name=strdup(argv[1]); validate_policy(policy_file_name, &ipa_policy_type, &xslt_file_name); if ( strncmp( ipa_policy_type, "ipaaction", 9)==0) { handle_ipaaction(policy_file_name); } else { find_output_handler(policy_file_name, xslt_file_name); free(xslt_file_name); } free(ipa_policy_type); free(policy_file_name); return 0; }