diff -urb cyrus-imapd-1.6.24/cyradm/cyrmain.c cyrus-imapd-1.6.24.new/cyradm/cyrmain.c --- cyrus-imapd-1.6.24/cyradm/cyrmain.c Thu Sep 30 09:24:45 1999 +++ cyrus-imapd-1.6.24.new/cyradm/cyrmain.c Sun Feb 18 23:57:15 2001 @@ -141,9 +141,23 @@ * Set the "tcl_interactive" variable. */ + /* + * force the tcl_interactive variable to "1". i wanted to be able + * to use the non-interactive stdin-interface to cyradm which one + * gets when piping to a process's stdin + * + * i.e. this change allows one to do the following and still be prompted + * for the password AND have the "createmailbox" procedure available: + * + * echo "createmailbox user.$NEW_USER" | cyradm -user cyrus localhost + * + * Enforcing this here might not be the cleanest way to do this, but + * it's definately the easiest and does the job ;) + * -- + */ + tty = isatty(0); - Tcl_SetVar(interp, "tcl_interactive", - ((fileName == NULL) && tty) ? "1" : "0", TCL_GLOBAL_ONLY); + Tcl_SetVar(interp, "tcl_interactive", "1", TCL_GLOBAL_ONLY); /* * Invoke application-specific initialization.