summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-03-10 08:19:58 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2016-03-12 21:19:06 +0100
commite0c86d21388bffe2e3919e780780c40d96186abb (patch)
tree925fcd346268794138743f29ecb2a4e8f6941366 /src
parent9f18131a2ace84c393982734c93ce22eda558510 (diff)
downloadsssd-e0c86d21388bffe2e3919e780780c40d96186abb.tar.gz
sssd-e0c86d21388bffe2e3919e780780c40d96186abb.tar.xz
sssd-e0c86d21388bffe2e3919e780780c40d96186abb.zip
libipa_hbac: Move the library to src/lib/ipa_hbac
Moving the library to the lib directory will force maintainers to think twice about changes, because it would be obvious this is a library. Also don't use includes from sssd source tree paths, but add the util path to Makefile's CFLAGS so that other projects can copy the hbac_evaluator.c file verbatim. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/ipa_hbac/hbac_evaluator.c (renamed from src/providers/ipa/hbac_evaluator.c)8
-rw-r--r--src/lib/ipa_hbac/ipa_hbac.doxy.in (renamed from src/providers/ipa/ipa_hbac.doxy.in)0
-rw-r--r--src/lib/ipa_hbac/ipa_hbac.exports (renamed from src/providers/ipa/ipa_hbac.exports)0
-rw-r--r--src/lib/ipa_hbac/ipa_hbac.h (renamed from src/providers/ipa/ipa_hbac.h)1
-rw-r--r--src/lib/ipa_hbac/ipa_hbac.pc.in (renamed from src/providers/ipa/ipa_hbac.pc.in)0
-rw-r--r--src/providers/ipa/ipa_access.c1
-rw-r--r--src/providers/ipa/ipa_hbac_common.c1
-rw-r--r--src/providers/ipa/ipa_hbac_private.h2
-rw-r--r--src/python/pyhbac.c2
-rw-r--r--src/tests/ipa_hbac-tests.c2
10 files changed, 7 insertions, 10 deletions
diff --git a/src/providers/ipa/hbac_evaluator.c b/src/lib/ipa_hbac/hbac_evaluator.c
index 271b170fa..ce13bd535 100644
--- a/src/providers/ipa/hbac_evaluator.c
+++ b/src/lib/ipa_hbac/hbac_evaluator.c
@@ -28,8 +28,8 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "providers/ipa/ipa_hbac.h"
-#include "util/sss_utf8.h"
+#include "ipa_hbac.h"
+#include "sss_utf8.h"
#ifndef HAVE_ERRNO_T
#define HAVE_ERRNO_T
@@ -358,7 +358,7 @@ static errno_t hbac_evaluate_element(struct hbac_rule_element *rule_el,
const char *hbac_result_string(enum hbac_eval_result result)
{
- switch(result) {
+ switch (result) {
case HBAC_EVAL_ALLOW:
return "HBAC_EVAL_ALLOW";
case HBAC_EVAL_DENY:
@@ -381,7 +381,7 @@ void hbac_free_info(struct hbac_info *info)
const char *hbac_error_string(enum hbac_error_code code)
{
- switch(code) {
+ switch (code) {
case HBAC_SUCCESS:
return "Success";
case HBAC_ERROR_NOT_IMPLEMENTED:
diff --git a/src/providers/ipa/ipa_hbac.doxy.in b/src/lib/ipa_hbac/ipa_hbac.doxy.in
index 6d4a92659..6d4a92659 100644
--- a/src/providers/ipa/ipa_hbac.doxy.in
+++ b/src/lib/ipa_hbac/ipa_hbac.doxy.in
diff --git a/src/providers/ipa/ipa_hbac.exports b/src/lib/ipa_hbac/ipa_hbac.exports
index abdcc5f5a..abdcc5f5a 100644
--- a/src/providers/ipa/ipa_hbac.exports
+++ b/src/lib/ipa_hbac/ipa_hbac.exports
diff --git a/src/providers/ipa/ipa_hbac.h b/src/lib/ipa_hbac/ipa_hbac.h
index 22dd8ffc4..8801c20c4 100644
--- a/src/providers/ipa/ipa_hbac.h
+++ b/src/lib/ipa_hbac/ipa_hbac.h
@@ -338,7 +338,6 @@ void hbac_free_info(struct hbac_info *info);
*/
bool hbac_rule_is_complete(struct hbac_rule *rule, uint32_t *missing_attrs);
-
/**
* @}
*/
diff --git a/src/providers/ipa/ipa_hbac.pc.in b/src/lib/ipa_hbac/ipa_hbac.pc.in
index c0fd70d1c..c0fd70d1c 100644
--- a/src/providers/ipa/ipa_hbac.pc.in
+++ b/src/lib/ipa_hbac/ipa_hbac.pc.in
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index ad12f21fc..3ec5a8df8 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -30,7 +30,6 @@
#include "providers/ldap/sdap_access.h"
#include "providers/ipa/ipa_common.h"
#include "providers/ipa/ipa_access.h"
-#include "providers/ipa/ipa_hbac.h"
#include "providers/ipa/ipa_hosts.h"
#include "providers/ipa/ipa_hbac_private.h"
#include "providers/ipa/ipa_hbac_rules.h"
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 72a620ef0..82c531f15 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -21,7 +21,6 @@
*/
#include "providers/ipa/ipa_hbac_private.h"
-#include "providers/ipa/ipa_hbac.h"
#include "providers/ipa/ipa_common.h"
static errno_t
diff --git a/src/providers/ipa/ipa_hbac_private.h b/src/providers/ipa/ipa_hbac_private.h
index c831cd5c6..8fc5dc6d0 100644
--- a/src/providers/ipa/ipa_hbac_private.h
+++ b/src/providers/ipa/ipa_hbac_private.h
@@ -24,7 +24,7 @@
#define IPA_HBAC_PRIVATE_H_
#include "providers/ipa/ipa_access.h"
-#include "providers/ipa/ipa_hbac.h"
+#include "lib/ipa_hbac/ipa_hbac.h"
#define IPA_HBAC_RULE "ipaHBACRule"
diff --git a/src/python/pyhbac.c b/src/python/pyhbac.c
index 820ef11b5..eb424c6dd 100644
--- a/src/python/pyhbac.c
+++ b/src/python/pyhbac.c
@@ -23,7 +23,7 @@
#include "util/util.h"
#include "util/sss_python.h"
-#include "providers/ipa/ipa_hbac.h"
+#include "lib/ipa_hbac/ipa_hbac.h"
#define PYTHON_MODULE_NAME "pyhbac"
diff --git a/src/tests/ipa_hbac-tests.c b/src/tests/ipa_hbac-tests.c
index f2192a6fb..c8ef7fe44 100644
--- a/src/tests/ipa_hbac-tests.c
+++ b/src/tests/ipa_hbac-tests.c
@@ -27,7 +27,7 @@
#include <talloc.h>
#include "tests/common_check.h"
-#include "providers/ipa/ipa_hbac.h"
+#include "lib/ipa_hbac/ipa_hbac.h"
#define HBAC_TEST_USER "testuser"
#define HBAC_TEST_INVALID_USER "nosuchuser"