summaryrefslogtreecommitdiff
path: root/src/responder/pam
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-08-15 15:10:42 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-16 11:11:24 +0200
commitaf824bac568ebe8a03273f73246ac78b415ea756 (patch)
tree3028cca3a8deb5ee5c950be48f46d3a2029a8465 /src/responder/pam
parentbdbf4f169e4d5d00b0616df19f7a55debb407f78 (diff)
downloadsssd-af824bac568ebe8a03273f73246ac78b415ea756.tar.gz
sssd-af824bac568ebe8a03273f73246ac78b415ea756.tar.bz2
sssd-af824bac568ebe8a03273f73246ac78b415ea756.zip
Build SELinux code in responder conditionally
https://fedorahosted.org/sssd/ticket/1480
Diffstat (limited to 'src/responder/pam')
-rw-r--r--src/responder/pam/pamsrv_cmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 92cd7340..8c9dd9b5 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -33,7 +33,9 @@
#include "responder/pam/pam_helpers.h"
#include "db/sysdb.h"
#include "db/sysdb_selinux.h"
+#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
+#endif
enum pam_verbosity {
PAM_VERBOSITY_NO_MESSAGES = 0,
@@ -354,6 +356,8 @@ fail:
return ret;
}
+#ifdef HAVE_SELINUX
+
#define ALL_SERVICES "*"
static errno_t write_selinux_string(const char *username, char *string)
@@ -595,6 +599,7 @@ done:
talloc_free(tmp_ctx);
return ret;
}
+#endif
static errno_t filter_responses(struct confdb_ctx *cdb,
struct response_data *resp_list)
@@ -791,6 +796,7 @@ static void pam_reply(struct pam_auth_req *preq)
return;
}
+#ifdef HAVE_SELINUX
if (pd->cmd == SSS_PAM_ACCT_MGMT &&
pd->pam_status == PAM_SUCCESS) {
/* Try to fetch data from sysdb
@@ -800,6 +806,7 @@ static void pam_reply(struct pam_auth_req *preq)
pd->pam_status = PAM_SYSTEM_ERR;
}
}
+#endif
ret = sss_packet_new(cctx->creq, 0, sss_packet_get_cmd(cctx->creq->in),
&cctx->creq->out);