aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.in35
2 files changed, 40 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bfda567659..9d685d4d94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-06-18 Dan Winship <danw@ximian.com>
+
+ * configure.in: Check the modes on $system_mail_dir and set up
+ variables for camel/Makefile to make camel-lock-helper
+ setuid/setgid.
+
2001-06-11 JP Rosevear <jpr@ximian.com>
* configure.in: One slight db3 check correction
diff --git a/configure.in b/configure.in
index 4b6fc7c2c8..d72df8b232 100644
--- a/configure.in
+++ b/configure.in
@@ -122,6 +122,39 @@ else
fi
AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir")
+case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
+d??????rw?)
+ CAMEL_LOCK_HELPER_USER=""
+ CAMEL_LOCK_HELPER_GROUP=""
+ system_mail_perm="world writable"
+ ;;
+
+d???rw????)
+ CAMEL_LOCK_HELPER_USER=""
+ CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
+ system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
+ ;;
+
+drw???????)
+ CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
+ CAMEL_LOCK_HELPER_GROUP=""
+ system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
+ ;;
+
+*)
+ CAMEL_LOCK_HELPER_USER=""
+ CAMEL_LOCK_HELPER_GROUP=""
+ system_mail_perm="???"
+ ;;
+esac
+
+AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
+AC_SUBST(CAMEL_LOCK_HELPER_USER)
+AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
+
+AM_CONDITIONAL(CAMEL_LOCK_HELPER_SETUID, test -n "$CAMEL_LOCK_HELPER_USER")
+AM_CONDITIONAL(CAMEL_LOCK_HELPER_SETGID, test -n "$CAMEL_LOCK_HELPER_GROUP")
+
dnl * Time zone stuff
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
AC_TRY_COMPILE([
@@ -1070,7 +1103,7 @@ echo "
fi
echo "
- Mail Directory: $system_mail_dir
+ Mail Directory: $system_mail_dir, $system_mail_perm
LDAP support: $msg_ldap
NNTP support: $msg_nntp
Pilot conduits: $msg_pilot