summaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-01-15 14:30:12 +0100
committerSumit Bose <sbose@redhat.com>2009-01-15 14:30:12 +0100
commit6cae4e801ef74d5953ee95d7b2b2fc48827af783 (patch)
tree1aed543847827b71bb3cf0e5bec680a5753cfef7 /worker
parent0ffaf86a5587257b67cbc8339c9543481e59ba3a (diff)
added include guards and licence information
Diffstat (limited to 'worker')
-rw-r--r--worker/helpers.c18
-rw-r--r--worker/helpers.h21
-rw-r--r--worker/ipaaction.c18
-rw-r--r--worker/ipaaction.h23
-rw-r--r--worker/output_handler.c18
-rw-r--r--worker/output_handler.h23
-rw-r--r--worker/sbus_client.c18
-rw-r--r--worker/sbus_client.h21
-rw-r--r--worker/util.h18
-rw-r--r--worker/worker.c26
-rw-r--r--worker/xml_helper.c18
-rw-r--r--worker/xml_helper.h22
12 files changed, 230 insertions, 14 deletions
diff --git a/worker/helpers.c b/worker/helpers.c
index 18b4d77..ef09904 100644
--- a/worker/helpers.c
+++ b/worker/helpers.c
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#define _GNU_SOURCE
#include <stdlib.h>
diff --git a/worker/helpers.h b/worker/helpers.h
index 259182a..5034e34 100644
--- a/worker/helpers.h
+++ b/worker/helpers.h
@@ -1,4 +1,23 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#ifndef _HELPERS_H_
+#define _HELPERS_H_
struct file_info {
char *name;
char *permission;
@@ -10,3 +29,5 @@ struct file_info {
int open_temporary_file(char *name, const char *permission, const char *user, const char *group, const char *selinux_context_string);
int exec_command(const char *command, const char *user, const char *group, char *arguments, char *extra_args);
+
+#endif /* _HELPERS_H_ */
diff --git a/worker/ipaaction.c b/worker/ipaaction.c
index f175a49..e3fc1ff 100644
--- a/worker/ipaaction.c
+++ b/worker/ipaaction.c
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/worker/ipaaction.h b/worker/ipaaction.h
index 2d70495..86f0891 100644
--- a/worker/ipaaction.h
+++ b/worker/ipaaction.h
@@ -1,4 +1,27 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef _IPAACTION_H_
+#define _IPAACTION_H_
+
int check_ipaaction_condition(const xmlDocPtr doc);
int ipaaction_file(const xmlDocPtr doc);
int ipaaction_run(const xmlDocPtr doc);
int handle_ipaaction(const char *policy_file_name);
+
+#endif /* _IPAACTION_H_ */
diff --git a/worker/output_handler.c b/worker/output_handler.c
index c77e15c..2e8819a 100644
--- a/worker/output_handler.c
+++ b/worker/output_handler.c
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/worker/output_handler.h b/worker/output_handler.h
index a4ca498..4868c9c 100644
--- a/worker/output_handler.h
+++ b/worker/output_handler.h
@@ -1,4 +1,27 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef _OUTPUT_HANDLER_H_
+#define _OUTPUT_HANDLER_H_
+
char *get_output_handler_parameter(xmlNode *node, const char *name, const char *default_value, const int required);
int output_handler_file(xmlNode *node, const xmlDocPtr doc, const char *xslt_file_name);
int output_handler_exec_with_args(xmlNode *node, const xmlDocPtr doc, const char *xslt_file_name);
int find_output_handler(const char *policy_file_name, const char *xslt_file_name);
+
+#endif /* _OUTPUT_HANDLER_H_ */
diff --git a/worker/sbus_client.c b/worker/sbus_client.c
index e8a6820..7b71223 100644
--- a/worker/sbus_client.c
+++ b/worker/sbus_client.c
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <errno.h>
#include <sys/time.h>
diff --git a/worker/sbus_client.h b/worker/sbus_client.h
index 0a4cecf..fa10576 100644
--- a/worker/sbus_client.h
+++ b/worker/sbus_client.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#ifndef _SBUS_CLIENT_H_
+#define _SBUS_CLIENT_H_
int setup_sbus_and_server_loop(void);
+
+#endif /* _SBUS_CLIENT_H_ */
diff --git a/worker/util.h b/worker/util.h
index 5bf0541..31e7052 100644
--- a/worker/util.h
+++ b/worker/util.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#ifndef __WORKER_UTIL_H__
#define __WORKER_UTIL_H__
diff --git a/worker/worker.c b/worker/worker.c
index 327f948..bb6860f 100644
--- a/worker/worker.c
+++ b/worker/worker.c
@@ -1,21 +1,19 @@
-/**
- * Author: Sumit Bose <sbose@redhat.com>
- *
- * Copyright (C) 2008 Red Hat
- *
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
* 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
- *
+ * Software Foundation; either version 3 of the License, or (at your option)
+ * any later version.
+ *
* 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.
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
*/
#include <popt.h>
diff --git a/worker/xml_helper.c b/worker/xml_helper.c
index b979dff..bf6672e 100644
--- a/worker/xml_helper.c
+++ b/worker/xml_helper.c
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <string.h>
#include <limits.h>
diff --git a/worker/xml_helper.h b/worker/xml_helper.h
index 326820f..ca9c22e 100644
--- a/worker/xml_helper.h
+++ b/worker/xml_helper.h
@@ -1,3 +1,24 @@
+/*
+ * Copyright (C) Sumit Bose 2009
+ *
+ * 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; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef _XML_HELPER_H_
+#define _XML_HELPER_H_
+
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
@@ -30,3 +51,4 @@ int setup_xml_search_path(const char *path);
int print_xml_search_path(void);
int free_xml_search_path(void);
+#endif /* _XML_HELPER_H_ */