summaryrefslogtreecommitdiffstats
path: root/src/external
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-02-09 12:39:49 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-03-11 09:05:50 -0500
commit5a88e963744e5da453e88b5c36499f04712df097 (patch)
tree1afc7d9fab016d91c050558d92f5e5deb6f0eab3 /src/external
parentce8e76190d96612961ef7e83fda74f1146a5fb12 (diff)
downloadsssd-5a88e963744e5da453e88b5c36499f04712df097.tar.gz
sssd-5a88e963744e5da453e88b5c36499f04712df097.tar.xz
sssd-5a88e963744e5da453e88b5c36499f04712df097.zip
Add better checks on PAM socket
- check if the public socket belongs to root and has 0666 permissions - use a SCM_CREDENTIALS message if available
Diffstat (limited to 'src/external')
-rw-r--r--src/external/platform.m412
1 files changed, 12 insertions, 0 deletions
diff --git a/src/external/platform.m4 b/src/external/platform.m4
index 71b4f2c85..ee0093789 100644
--- a/src/external/platform.m4
+++ b/src/external/platform.m4
@@ -27,3 +27,15 @@ fi
AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" == xfedora])
AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" == xredhat])
AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" == xsuse])
+
+AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
+ [[#define _GNU_SOURCE
+ #include <sys/socket.h>]])
+
+if test x"$ac_cv_member_struct_ucred_pid" = xyes -a \
+ x"$ac_cv_member_struct_ucred_uid" = xyes -a \
+ x"$ac_cv_member_struct_ucred_gid" = xyes ; then
+ AC_DEFINE([HAVE_UCRED], [1], [Define if struct ucred is available])
+else
+ AC_MSG_WARN([struct ucred is not available])
+fi