From 22f88d18269c3d23efc3933cff971070dfa11aa1 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 18 Jun 2001 18:16:55 +0000 Subject: Check the modes on $system_mail_dir and set up variables for * configure.in: Check the modes on $system_mail_dir and set up variables for camel/Makefile to make camel-lock-helper setuid/setgid. svn path=/trunk/; revision=10266 --- ChangeLog | 6 ++++++ configure.in | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bfda567659..9d685d4d94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-06-18 Dan Winship + + * 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 * 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 -- cgit v1.2.3