* Default for autologin is now DISABLED! If you are upgrading an existing
authorArt Cancro <ajc@citadel.org>
Wed, 12 Oct 2005 03:15:27 +0000 (03:15 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 12 Oct 2005 03:15:27 +0000 (03:15 +0000)
  site and are using this function, you must --enable-autologin
* newinstall.sh: --enable-autologin if upgrading an existing installation
  that we think is set to autologin.  It checks for chkpwd to find out.

citadel/ChangeLog
citadel/configure.ac
citadel/newinstall.sh

index df6aa0f0df4037102e481fd6379bc8b0faf2970e..df71387e9b5510cbc4f09a10f5facc927e5392d4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Oct 11 23:13:53 EDT 2005 Art Cancro <ajc@uncensored.citadel.org>
+* Default for autologin is now DISABLED!  If you are upgrading an existing
+  site and are using this function, you must --enable-autologin
+* newinstall.sh: --enable-autologin if upgrading an existing installation
+  that we think is set to autologin.  It checks for chkpwd to find out.
+
 Tue Oct 11 12:55:43 EDT 2005 Art Cancro <ajc@uncensored.citadel.org>
 * The "set the flags" portion of IMAP COPY now sets the flags of all messages
   in bulk, instead of one message at a time.  Big performance boost.
index b332cbc1e6841231a3d8148593000cab7ec6c91f..ab51500e7c868a30bfee4ea2bcc12dc1883be7f4 100644 (file)
@@ -84,7 +84,7 @@ AC_ARG_WITH(docdir,
 
 
 
-AC_ARG_ENABLE(autologin, [  --disable-autologin     disable autologin (default is enabled if possible)])
+AC_ARG_ENABLE(autologin, [  --enable-autologin      enable autologin (default is disabled)])
 AC_ARG_ENABLE(chkpwd, [  --disable-chkpwd        don't build 'chkpwd'])
 
 AC_ARG_ENABLE(threaded-client, [  --disable-threaded-client
@@ -261,7 +261,7 @@ AC_CHECK_LIB(rt, sched_yield)
 dnl Determine the system's authentication capabilities, if autologin is
 dnl requested. We currently support PAM, standard getpwnam(), and getspnam()
 dnl (Linux shadow passwords)
-if test "$enable_autologin" != no; then
+if test "$enable_autologin" = yes; then
        if test "$with_pam" = yes; then
                save_LIBS=$LIBS
                AC_CHECK_LIB(pam, pam_start, [chkpwd_LIBS="-lpam $chkpwd_LIBS"
index a1c34f813fd3a438aa5d647876d03e63cbb0e843..4548a7fcc2b2c5ae0625b1625d3fda9e4c443bd0 100644 (file)
@@ -92,6 +92,7 @@ MAKEOPTS=""
 # CFLAGS               C compiler flags
 # LDFLAGS              Linker flags
 # IS_UPGRADE           Set to "yes" if upgrading an existing Citadel
+# IS_AUTOLOGIN         Set to "yes" to force enabling autologin
 # CTDL_DIALOG          Where (if at all) the "dialog" program may be found
 
 # Let Citadel setup recognize the Citadel installer
@@ -264,11 +265,16 @@ install_sources () {
                cd $BUILD 2>&1 >>$LOG || die
                ( gzip -dc $CITADEL_SOURCE | tar -xvf - ) 2>&1 >>$LOG || die
                cd $BUILD/citadel 2>&1 >>$LOG || die
+               if [ x$IS_AUTOLOGIN = xyes ] ; then
+                       AL="--enable-autologin"
+               else
+                       AL=""
+               fi
                if [ -z "$OK_DB" ]
                then
-                       ./configure --prefix=$CITADEL --with-db=$SUPPORT --with-pam --enable-autologin --with-libical --disable-threaded-client 2>&1 >>$LOG || die
+                       ./configure --prefix=$CITADEL --with-db=$SUPPORT --with-pam $AL --with-libical --disable-threaded-client 2>&1 >>$LOG || die
                else
-                       ./configure --prefix=$CITADEL --with-db=$OK_DB --with-pam --enable-autologin --with-libical --disable-threaded-client 2>&1 >>$LOG || die
+                       ./configure --prefix=$CITADEL --with-db=$OK_DB --with-pam $AL --with-libical --disable-threaded-client 2>&1 >>$LOG || die
                fi
                $MAKE $MAKEOPTS 2>&1 >>$LOG || die
                if [ $IS_UPGRADE = yes ]
@@ -317,7 +323,6 @@ do_config () {
 
        if [ x$IS_UPGRADE == xyes ] ; then
                echo Upgrading your existing Citadel installation.
-               #$CITADEL/setup -q || die
                $CITADEL/setup </dev/tty || die
        else
                echo This is a new Citadel installation.
@@ -386,6 +391,12 @@ mkdir -p $BUILD
 cd $BUILD
 
 
+# 1B. Determine whether we are upgrading an autologin installation
+[ -x $CITADEL/chkpwd ] && {
+       IS_AUTOLOGIN="yes"
+}
+
+
 # 2. Present the installation steps (from 1 above) to the user
 clear
 if dialog --clear </dev/tty ; then
@@ -404,6 +415,10 @@ echo ""
 echo "Configuration:"
 echo "* Configure Citadel"
 echo "* Configure WebCit"
+if [ x$IS_AUTOLOGIN = xyes ] ; then
+       echo 'NOTE: this is an autologin installation.'
+       echo '      Authentication against user accounts on the host system is enabled.'
+fi
 echo ""
 echo -n "Perform the above installation steps now? "
 read yesno </dev/tty