Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8822 Modified Files: ChangeLog INSTALL NEWS auth.c autorespond.c configure configure.in user.c util.c Log Message: Final update of batch. Verify all patches are intact. See NEWS and TODO\! Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChangeLog 29 Jan 2004 05:18:22 -0000 1.15 +++ ChangeLog 1 Feb 2004 00:50:28 -0000 1.16 @@ -1,6 +1,11 @@ Numbers in square brackets ([]) indicate tracker item on SourceForge with patch or information related to the entry. +1.2.1-pre1 - unreleased + + Tom Collins + - Add note to INSTALL about requiring vpopmail 5.4.0 or later. + 1.2.0 - released 28-Jan-04 Tom Collins Index: INSTALL =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/INSTALL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- INSTALL 24 Jan 2004 15:55:16 -0000 1.5 +++ INSTALL 1 Feb 2004 00:50:28 -0000 1.6 @@ -1,5 +1,7 @@ Install guide +QmailAdmin 1.2.0 and later requires Vpopmail 5.4.0 or later. + Please note that any time you reconfigure and install vpopmail you will need to rebuild and install QmailAdmin. QmailAdmin statically links libvpopmail, so you need to recompile it Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- NEWS 31 Jan 2004 11:08:00 -0000 1.5 +++ NEWS 1 Feb 2004 00:50:28 -0000 1.6 @@ -1,7 +1,9 @@ See CHANGELOG -NOTE: QmailAdmin 1.3.0 may not run properly... I still have -more changes to add! +NOTE: QmailAdmin ~should~ still run like it used to before I +made all these changes, but it has not been tested extensivly. +I see no need to worry about that now as the rip and tear is +not over, as you can see in TODO. The following information relates to a large block of changes that Rick Widmer added right before the final release of 1.2.0. @@ -10,6 +12,44 @@ ################################################################# +The final (hopefully) update : + +Copy the build system from 1.2.0 final. + +Identify all changes from PRE-1 to FINAL and make sure they are +all in 1.3.0. + + alias.c + Delete duplicated #include <unistd.h> + Delete invalid fclose about line 117 + + auth.c + Check HAS_PW_FLAGS about line 155 + + autorespond.c + strreplace(addr, ':', '.') about line 89 + + qmailadmin.c + undef PACKAGE_* + + template.c + undef PACKAGE_* + add comment to ##z + make value static in get_session_val + + user.c + undef PACKAGE_* + substantial changes to update_user_info + + util.c + add warning about memory leak in get_html_text() + make tmpbuf static in get_color_text + make tmpbuf static in get_quota_used + + + +################################################################# + Changes from 040116 : Replace vclose(); exit(0); with return() so everything returns Index: auth.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/auth.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- auth.c 31 Jan 2004 11:08:00 -0000 1.6 +++ auth.c 1 Feb 2004 00:50:28 -0000 1.7 @@ -40,7 +40,11 @@ if ( strlen(Domain) > 0 ) { if ( strcmp(Username,"postmaster")==0 ) { AdminType = DOMAIN_ADMIN; +#ifdef VQPASSWD_HAS_PW_FLAGS + } else if ( vpw->pw_flags & QA_ADMIN ) { +#else } else if ( vpw->pw_gid & QA_ADMIN ) { +#endif AdminType = DOMAIN_ADMIN; } else { AdminType = USER_ADMIN; Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- autorespond.c 31 Jan 2004 11:08:00 -0000 1.7 +++ autorespond.c 1 Feb 2004 00:50:28 -0000 1.8 @@ -89,7 +89,7 @@ sort_dosort(); for (i = 0; addr = sort_get_entry(i); ++i) { - for(i=0;addr[i]!=0;++i) if ( addr[i] == ':' ) addr[i] = '.'; + str_replace(addr, ':', '.'); qmail_button(uBufA, "delautorespond", addr, "delete.png" ); qmail_button(uBufB, "modautorespond", addr, "modify.png" ); Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- configure 30 Jan 2004 08:30:58 -0000 1.16 +++ configure 1 Feb 2004 00:50:28 -0000 1.17 @@ -1658,7 +1658,7 @@ QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.0" +QA_VERSION="1.2.1-pre1" cat >>confdefs.h <<_ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure.in 24 Jan 2004 15:56:51 -0000 1.15 +++ configure.in 1 Feb 2004 00:50:28 -0000 1.16 @@ -6,7 +6,7 @@ AC_CANONICAL_HOST QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.0" +QA_VERSION="1.2.1-pre1" AC_DEFINE_UNQUOTED(QA_PACKAGE,"$QA_PACKAGE","") AC_DEFINE_UNQUOTED(QA_VERSION,"$QA_VERSION","") Index: user.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- user.c 31 Jan 2004 11:08:00 -0000 1.14 +++ user.c 1 Feb 2004 00:50:28 -0000 1.15 @@ -352,43 +352,22 @@ #endif (mypw = vauth_getpw( Newu, Domain )) != NULL ) { - /* from the load_limits() function, set user flags */ - /* These aren't default limits, they're domain limits. - They should not be applied to new accounts. - if( DisablePOP > 0 ) mypw->pw_gid |= NO_POP; - if( DisableIMAP > 0 ) mypw->pw_gid |= NO_IMAP; - if( DisableDialup > 0 ) mypw->pw_gid |= NO_DIALUP; - if( DisablePasswordChanging > 0 ) mypw->pw_gid |= NO_PASSWD_CHNG; - if( DisableWebmail > 0 ) mypw->pw_gid |= NO_WEBMAIL; - if( DisableRelay > 0 ) mypw->pw_gid |= NO_RELAY; - */ - - /* Once we're sure people are using vpopmail 5.3.29 or later, - * we can switch back to old code (that only sets quota if - * there's something in the field). + /* vadduser() in vpopmail 5.3.29 and later sets the default + * quota, so we only need to change it if the user enters + * something in the Quota field. */ - if (Limits.defaultquota > 0) { - if (Limits.defaultmaxmsgcount > 0) - snprintf(pw_shell, sizeof(pw_shell), "%dS,%dC", Limits.defaultquota, Limits.defaultmaxmsgcount); - else - snprintf(pw_shell, sizeof(pw_shell), "%dS", Limits.defaultquota); - } else { - strcpy(pw_shell, "NOQUOTA"); - } - // Code added by jhopper #ifdef MODIFY_QUOTA if (strcmp (Quota, "NOQUOTA") == 0) { - strcpy (pw_shell, "NOQUOTA"); + vsetuserquota (Newu, Domain, "NOQUOTA"); } else if ( Quota[0] != 0 ) { if(quota_to_bytes(qconvert, Quota)) { sprintf(StatusMessage, get_html_text("314")); } else { - strcpy (pw_shell, qconvert); + vsetuserquota (Newu, Domain, qconvert); } } #endif - mypw->pw_shell = pw_shell; #ifdef MODIFY_SPAM GetValue(TmpCGI, spamvalue, "spamcheck=", sizeof(spamvalue)); @@ -400,24 +379,13 @@ } #endif - /* update the user information */ - if ( vauth_setpw( mypw, Domain ) != VA_SUCCESS ) { - - /* report error */ - sprintf(StatusMessage, "%s %s@%s (%s) %s", - get_html_text("002"), Newu, Domain, Gecos, - get_html_text("120")); - - } else { - - /* report success */ - sprintf(StatusMessage, "%s %s@%s (%s) %s", - get_html_text("002"), Newu, Domain, Gecos, - get_html_text("119")); - } + /* report success */ + sprintf(StatusMessage, "%s %s@%s (%s) %s", + get_html_text("002"), Newu, Domain, Gecos, + get_html_text("119")); - /* otherwise, report error */ } else { + /* otherwise, report error */ sprintf(StatusMessage, "<font color=\"red\">%s %s@%s (%s) %s</font>", get_html_text("002"), Newu, Domain, Gecos, get_html_text("120")); } Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- util.c 31 Jan 2004 11:08:00 -0000 1.8 +++ util.c 1 Feb 2004 00:50:28 -0000 1.9 @@ -499,6 +499,9 @@ } } +/* It's a good thing qmailadmin is a cgi script, because this + function leaks memory. That's OK though, Tom has plans + for rewriting the html_text stuff soon. */ char *get_html_text( char *index ) { static char *tmpbuf; |