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:44 -0500
commitff019cfb5d083a152361ec9ce3f233211ff3907a (patch)
tree1afc7d9fab016d91c050558d92f5e5deb6f0eab3 /src/external
parenta07749e58bd4b20c41273fdf3463b1177255e9ef (diff)
downloadsssd-ff019cfb5d083a152361ec9ce3f233211ff3907a.tar.gz
sssd-ff019cfb5d083a152361ec9ce3f233211ff3907a.tar.xz
sssd-ff019cfb5d083a152361ec9ce3f233211ff3907a.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