From: <rw...@pr...> - 2004-01-30 22:04:13
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27610 Modified Files: NEWS alias.c auth.c autorespond.c command.c configure forward.c mailinglist.c qmailadmin.c qmailadminx.h show.c template.c user.c util.c Log Message: Big changes part 3. See NEWS for details Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NEWS 30 Jan 2004 06:45:08 -0000 1.3 +++ NEWS 30 Jan 2004 08:30:58 -0000 1.4 @@ -11,6 +11,18 @@ ################################################################# +Changes from 040109 : + +Change from global TmpBuf* to function local Buffer* + +Start using more parms instead of globals. + +Remove some authentication checking deep within the program +because the limits will be enforced in command.c instead. + + +################################################################# + Changes from 040108 : Remove show_aliases from alias.c. (obsolete) Index: alias.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/alias.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- alias.c 30 Jan 2004 06:45:08 -0000 1.6 +++ alias.c 30 Jan 2004 08:30:58 -0000 1.7 @@ -49,7 +49,9 @@ DIR *mydir; struct dirent *mydirent; FILE *fs; - char Buffer[MAX_BUFF]; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; char alias_user[MAX_BUFF]; char alias_name[MAX_FILE_NAME]; char *alias_domain; @@ -110,9 +112,9 @@ alias_name[j] = mydirent->d_name[i] == ':' ? '.' : mydirent->d_name[i]; } alias_name[j] = 0; - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - fgets(TmpBuf2, sizeof(TmpBuf2), fs); - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + memset(Buffer2, 0, sizeof(Buffer2)); + fgets(Buffer2, sizeof(Buffer2), fs); + alias_name_from_command = dotqmail_alias_command(Buffer2); /* Note that the current system fails for multi-line .qmail-user files where the first line starts with a '#' or is invalid. @@ -120,33 +122,33 @@ on program delivery that contains ezmlm) but bad for people who may have complex .qmail-user files that start with a comment. */ - if ( alias_name_from_command != NULL || *TmpBuf2 == '#') { + if ( alias_name_from_command != NULL || *Buffer2 == '#') { stop=0; qmail_button(uBufA, "deldotqmail", alias_name, "trash.png"); - if (*TmpBuf2 == '#') + if (*Buffer2 == '#') strcpy( uBufB, " "); else qmail_button(uBufB, "moddotqmail", alias_name, "modify.png"); sprintf(uBufC, "%s", alias_name); - if (*TmpBuf2 == '#') { + if (*Buffer2 == '#') { /* this is a blackhole account */ - sprintf (Buffer, "%s", get_html_text("303")); + sprintf (Buffer1, "%s", get_html_text("303")); stop = 1; } while (!stop) { - strcpy(Buffer, ""); + strcpy(Buffer1, ""); - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + alias_name_from_command = dotqmail_alias_command(Buffer2); /* check to see if it is an invalid line , * if so skip to next */ if (alias_name_from_command == NULL ) { - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs)==NULL) { + if (fgets(Buffer2, sizeof(Buffer2), fs)==NULL) { stop=1; } continue; @@ -160,11 +162,11 @@ alias_domain++; if(strcmp(alias_domain, Domain)==0) { /* if a local user, exclude the domain */ - strcpy(TmpBuf3, alias_user); - for(j=0; TmpBuf3[j]!=0 && TmpBuf3[j]!='@';j++); - TmpBuf3[j]=0; - if (check_local_user(TmpBuf3)) { - strcpy(alias_user, TmpBuf3); + strcpy(Buffer3, alias_user); + for(j=0; Buffer3[j]!=0 && Buffer3[j]!='@';j++); + Buffer3[j]=0; + if (check_local_user(Buffer3)) { + strcpy(alias_user, Buffer3); } else { /* make it red so it jumps out -- this is no longer a valid forward */ sprintf(alias_user, "<font color=\"red\">%s</font>", @@ -172,16 +174,16 @@ } } - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs) == NULL) { + if (fgets(Buffer2, sizeof(Buffer2), fs) == NULL) { stop=1; - sprintf(Buffer, "%s%s ", Buffer, alias_user); + sprintf(Buffer1, "%s%s ", Buffer1, alias_user); } else { - sprintf(Buffer, "%s%s, ", Buffer, alias_user); + sprintf(Buffer1, "%s%s, ", Buffer1, alias_user); } } - strcpy(uBufD, Buffer); - strcpy(Buffer, ""); + strcpy(uBufD, Buffer1); + strcpy(Buffer1, ""); send_template_now("show_forwards_line.html"); } fclose(fs); @@ -208,6 +210,8 @@ char *alias_domain; char *alias_name_from_command; char *dot_file; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; int l,j; if ( AdminType!=DOMAIN_ADMIN ) { @@ -230,10 +234,10 @@ return(144); } - memset(TmpBuf2, 0, sizeof(TmpBuf2)); + memset(Buffer2, 0, sizeof(Buffer2)); - while (fgets( TmpBuf2, sizeof(TmpBuf2), fs) != NULL) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + while (fgets( Buffer2, sizeof(Buffer2), fs) != NULL) { + alias_name_from_command = dotqmail_alias_command(Buffer2); /* check to see if it is an invalid line , if so skip to next*/ if (alias_name_from_command == NULL ) continue; @@ -246,11 +250,11 @@ alias_domain++; if(strcmp(alias_domain, Domain)==0) { /* if a local user, exclude the domain */ - strcpy(TmpBuf3, alias_user); - for(j=0; TmpBuf3[j]!=0 && TmpBuf3[j]!='@';j++); - TmpBuf3[j]=0; - if (check_local_user(TmpBuf3)) { - strcpy(alias_user, TmpBuf3); + strcpy(Buffer3, alias_user); + for(j=0; Buffer3[j]!=0 && Buffer3[j]!='@';j++); + Buffer3[j]=0; + if (check_local_user(Buffer3)) { + strcpy(alias_user, Buffer3); } else { /* make it red so it jumps out -- this is no longer a valid forward */ sprintf(alias_user, "<font color=\"red\">%s</font>", @@ -265,6 +269,7 @@ FILE *fs; char *alias_name_from_command; char *dot_file; + char Buffer[MAX_BUFF]; int l,j; l = strlen(user); @@ -283,8 +288,8 @@ } j=0; - while( fgets( TmpBuf2, sizeof(TmpBuf2), fs) != NULL ) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + while( fgets( Buffer, sizeof(Buffer), fs) != NULL ) { + alias_name_from_command = dotqmail_alias_command(Buffer); /* check to see if it is an invalid line , if so skip to next */ if (alias_name_from_command == NULL ) continue; @@ -299,17 +304,19 @@ -moddotqmail() +void moddotqmail() { + if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); vclose(); exit(0); } + send_template("mod_dotqmail.html"); } -moddotqmailnow() +void moddotqmailnow() { struct vqpasswd *pw; @@ -371,6 +378,7 @@ adddotqmailnow() { + char Buffer[MAX_BUFF]; struct vqpasswd *pw; if (AdminType!=DOMAIN_ADMIN && @@ -401,6 +409,8 @@ } int adddotqmail_shared(char *forwardname, char *dest, int create) { + char Buffer[MAX_BUFF]; + /* adds line to .qmail for forwardname to dest */ /* (if create is 0, this is modifying an existing forward) */ /* returns -1 if error orccured, 0 if successful */ @@ -439,8 +449,8 @@ return(-1); } - sprintf(TmpBuf2, "&%s\n", dest); - if (dotqmail_add_line(forwardname, TmpBuf2)) { + sprintf(Buffer, "&%s\n", dest); + if (dotqmail_add_line(forwardname, Buffer)) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 2); return(-1); } Index: auth.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/auth.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- auth.c 30 Jan 2004 03:28:19 -0000 1.4 +++ auth.c 30 Jan 2004 08:30:58 -0000 1.5 @@ -41,6 +41,8 @@ time_t time1; time_t time2; char ip_value[MAX_BUFF]; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if( chdir(RealDir) < 0 ){ sprintf(StatusMessage, "%s %s\n", get_html_text("171"), RealDir); @@ -49,9 +51,9 @@ exit(0); } - sprintf(TmpBuf1, "%s/Maildir/%s.qw", pw->pw_dir, Time); + sprintf(Buffer1, "%s/Maildir/%s.qw", pw->pw_dir, Time); - fs = fopen(TmpBuf1, "r"); + fs = fopen(Buffer1, "r"); if ( fs == NULL ) { sprintf(StatusMessage, "%s\n", get_html_text("172")); show_login(); @@ -59,7 +61,7 @@ exit(0); } - if ( fgets(TmpBuf, sizeof(TmpBuf), fs) == NULL ) { + if ( fgets(Buffer2, sizeof(Buffer2), fs) == NULL ) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 4); vclose(); exit(0); @@ -67,9 +69,9 @@ fclose(fs); #ifdef IPAUTH - GetValue(TmpBuf, ip_value, "ip_addr=", sizeof(ip_value)); + GetValue(Buffer2, ip_value, "ip_addr=", sizeof(ip_value)); if ( strcmp(ip_addr, ip_value) != 0 ) { - unlink(TmpBuf1); + unlink(Buffer1); sprintf(StatusMessage,"invalid\n"); show_login(); vclose(); @@ -79,7 +81,7 @@ time1 = atoi(Time); time2 = time(NULL); if ( time2 > time1 + 7200 ) { - unlink(TmpBuf1); + unlink(Buffer1); sprintf(StatusMessage, "%s\n", get_html_text("173")); show_login(); vclose(); @@ -95,6 +97,8 @@ time_t time1; time_t time2; char ip_value[MAX_BUFF]; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( chdir(RealDir) < 0 ) { sprintf(StatusMessage, "%s %s\n", get_html_text("171"), RealDir ); @@ -103,9 +107,9 @@ exit(0); } - sprintf(TmpBuf1, "%s/Maildir/%s.qw", pw->pw_dir, Time); + sprintf(Buffer1, "%s/Maildir/%s.qw", pw->pw_dir, Time); - fs = fopen(TmpBuf1, "r"); + fs = fopen(Buffer1, "r"); if ( fs == NULL ) { sprintf(StatusMessage, "%s\n", get_html_text("172")); show_login(); @@ -113,7 +117,7 @@ exit(0); } - if ( fgets(TmpBuf, sizeof(TmpBuf), fs) == NULL ) { + if ( fgets(Buffer2, sizeof(Buffer2), fs) == NULL ) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 5); vclose(); exit(0); @@ -121,10 +125,10 @@ fclose(fs); #ifdef IPAUTH - GetValue(TmpBuf, ip_value, "ip_addr=", sizeof(ip_value)); + GetValue(Buffer2, ip_value, "ip_addr=", sizeof(ip_value)); if ( strcmp(ip_addr, ip_value) != 0 ) { - unlink(TmpBuf1); - sprintf(StatusMessage, "%s %d (%s != %s .. %s)\n", get_html_text("150"), 6, ip_addr, ip_value, TmpBuf); + unlink(Buffer1); + sprintf(StatusMessage, "%s %d (%s != %s .. %s)\n", get_html_text("150"), 6, ip_addr, ip_value, Buffer2); show_login(); vclose(); exit(0); @@ -133,7 +137,7 @@ time1 = atoi(Time); time2 = time(NULL); if ( time2 > time1 + 7200 ) { - unlink(TmpBuf1); + unlink(Buffer1); sprintf(StatusMessage, "%s\n", get_html_text("173")); show_login(); vclose(); Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- autorespond.c 30 Jan 2004 06:45:08 -0000 1.5 +++ autorespond.c 30 Jan 2004 08:30:58 -0000 1.6 @@ -56,6 +56,7 @@ struct dirent *mydirent; FILE *fs; char *addr; + char Buffer[MAX_BUFF]; int i,j; if ( (mydir = opendir(".")) == NULL ) { @@ -75,10 +76,10 @@ continue; } - fgets( TmpBuf2, sizeof(TmpBuf2), fs); + fgets( Buffer, sizeof(Buffer), fs); fclose(fs); - if ( strstr( TmpBuf2, "autorespond") != 0 ) { + if ( strstr( Buffer, "autorespond") != 0 ) { sort_add_entry (&mydirent->d_name[7], 0); } } @@ -123,6 +124,8 @@ FILE *fs; int i; struct vqpasswd *vpw; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -184,21 +187,21 @@ /* * Make the autorespodner directory */ - memset(TmpBuf2,0,sizeof(TmpBuf2)); - strncpy(TmpBuf2, ActionUser, sizeof(TmpBuf2)); - upperit(TmpBuf2); - mkdir(TmpBuf2, 0750); + memset(Buffer2,0,sizeof(Buffer2)); + strncpy(Buffer2, ActionUser, sizeof(Buffer2)); + upperit(Buffer2); + mkdir(Buffer2, 0750); /* * Make the autoresponder .qmail file */ - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for(i=6;TmpBuf[i]!=0;++i) if ( TmpBuf[i] == '.' ) TmpBuf[i] = ':'; + sprintf(Buffer1, ".qmail-%s", ActionUser); + for(i=6;Buffer1[i]!=0;++i) if ( Buffer1[i] == '.' ) Buffer1[i] = ':'; - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "|%s/autorespond 10000 5 %s/%s/message %s/%s\n", - AUTORESPOND_PATH, RealDir, TmpBuf2, RealDir, TmpBuf2); + AUTORESPOND_PATH, RealDir, Buffer2, RealDir, Buffer2); if ( strlen(Newu) > 0 ) { fprintf(fs, "&%s\n", Newu); @@ -208,8 +211,8 @@ /* * Make the autoresponder message file */ - sprintf(TmpBuf, "%s/message", TmpBuf2); - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + sprintf(Buffer1, "%s/message", Buffer2); + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "From: %s@%s\n", ActionUser,Domain); fprintf(fs, "Subject: %s\n\n", Alias); fprintf(fs, "%s", Message); @@ -238,6 +241,8 @@ { int i; int pid; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -246,22 +251,22 @@ } for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]=='.') ActionUser[i] = ':'; - sprintf(TmpBuf2, ".qmail-%s", ActionUser); - if ( unlink(TmpBuf2) != 0 ) ack( get_html_text("181"), 345); + sprintf(Buffer2, ".qmail-%s", ActionUser); + if ( unlink(Buffer2) != 0 ) ack( get_html_text("181"), 345); - memset(TmpBuf2,0,sizeof(TmpBuf2)); + memset(Buffer2,0,sizeof(Buffer2)); for(i=0;ActionUser[i]!=0;++i) { if(islower(ActionUser[i])) { - TmpBuf2[i]=toupper(ActionUser[i]); + Buffer2[i]=toupper(ActionUser[i]); } else { - TmpBuf2[i]=ActionUser[i]; + Buffer2[i]=ActionUser[i]; } } - for(i=0;TmpBuf2[i]!=0;++i) if (TmpBuf2[i]==':') TmpBuf2[i] = '.'; + for(i=0;Buffer2[i]!=0;++i) if (Buffer2[i]==':') Buffer2[i] = '.'; for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]==':') ActionUser[i] = '.'; - sprintf(TmpBuf, "%s/%s", RealDir, TmpBuf2); - vdelfiles(TmpBuf); + sprintf(Buffer1, "%s/%s", RealDir, Buffer2); + vdelfiles(Buffer1); sprintf(StatusMessage, "%s %s\n", get_html_text("182"), ActionUser); if(CurAutoResponders == 0) { @@ -360,7 +365,7 @@ { char Buffer[MAX_BUFF]; - while (fgets(Buffer, sizeof(TmpBuf2), MessageFile)) { + while (fgets(Buffer, sizeof(Buffer), MessageFile)) { fprintf(actout, "%s", Buffer); } } @@ -371,6 +376,9 @@ FILE *fs; int i; struct vqpasswd *vpw; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -410,23 +418,23 @@ /* * Make the autoresponder directory */ - strcpy(TmpBuf2,ActionUser); - upperit(TmpBuf2); - mkdir(TmpBuf2, 0750); + strcpy(Buffer2,ActionUser); + upperit(Buffer2); + mkdir(Buffer2, 0750); /* * Make the autoresponder .qmail file */ - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for(i=6;TmpBuf[i]!=0;++i) if ( TmpBuf[i] == '.' ) TmpBuf[i] = ':'; - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + sprintf(Buffer1, ".qmail-%s", ActionUser); + for(i=6;Buffer1[i]!=0;++i) if ( Buffer1[i] == '.' ) Buffer1[i] = ':'; + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "|%s/autorespond 10000 5 %s/%s/message %s/%s\n", - AUTORESPOND_PATH, RealDir, TmpBuf2, RealDir, TmpBuf2); + AUTORESPOND_PATH, RealDir, Buffer2, RealDir, Buffer2); if ( strlen(Newu) > 0 ) { - for(i=0;Newu[i]!='@';TmpBuf3[i] = Newu[i],++i); - if((vpw=vauth_getpw(TmpBuf3, Domain))!=NULL && (strstr(Newu,Domain)!= 0)){ + for(i=0;Newu[i]!='@';Buffer3[i] = Newu[i],++i); + if((vpw=vauth_getpw(Buffer3, Domain))!=NULL && (strstr(Newu,Domain)!= 0)){ fprintf(fs, "%s/Maildir/\n", vpw->pw_dir); } else { fprintf(fs, "&%s\n", Newu); @@ -439,8 +447,8 @@ /* * Make the autoresponder message file */ - sprintf(TmpBuf, "%s/message", TmpBuf2); - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + sprintf(Buffer1, "%s/message", Buffer2); + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "From: %s@%s\n", ActionUser,Domain); fprintf(fs, "Subject: %s\n\n", Alias); fprintf(fs, "%s", Message); Index: command.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/command.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- command.c 30 Jan 2004 06:45:08 -0000 1.4 +++ command.c 30 Jan 2004 08:30:58 -0000 1.5 @@ -33,115 +33,116 @@ -process_commands() +process_commands(char *command) { - int pid; + int pid; + char Buffer[MAX_BUFF]; - if (strcmp(TmpBuf2, "showmenu") == 0 ) { + if (strcmp(command, "showmenu") == 0 ) { show_menu(Username, Domain, Mytime); - } else if (strcmp(TmpBuf2, "showusers") == 0) { + } else if (strcmp(command, "showusers") == 0) { GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); GetValue(TmpCGI, SearchUser, "searchuser=", sizeof(SearchUser)); - show_users(Username, Domain, Mytime, TmpBuf2); + show_users(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "showforwards") == 0) { + } else if (strcmp(command, "showforwards") == 0) { GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); - show_forwards(Username, Domain, Mytime, TmpBuf2); + show_forwards(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "showmailinglists") == 0) { - show_mailing_lists(Username, Domain, Mytime, TmpBuf2); + } else if (strcmp(command, "showmailinglists") == 0) { + show_mailing_lists(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "showautoresponders") == 0) { - show_autoresponders(Username, Domain, Mytime, TmpBuf2); + } else if (strcmp(command, "showautoresponders") == 0) { + show_autoresponders(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "adduser") == 0 ) { + } else if (strcmp(command, "adduser") == 0 ) { adduser(); - } else if (strcmp(TmpBuf2, "addusernow") == 0 ) { + } else if (strcmp(command, "addusernow") == 0 ) { addusernow(); - } else if (strcmp(TmpBuf2, "bounceall") == 0 ) { + } else if (strcmp(command, "bounceall") == 0 ) { bounceall(); - } else if (strcmp(TmpBuf2, "deleteall") == 0 ) { + } else if (strcmp(command, "deleteall") == 0 ) { deleteall(); - } else if (strcmp(TmpBuf2, "setremotecatchall") == 0 ) { + } else if (strcmp(command, "setremotecatchall") == 0 ) { setremotecatchall(); - } else if (strcmp(TmpBuf2, "setremotecatchallnow") == 0 ) { + } else if (strcmp(command, "setremotecatchallnow") == 0 ) { setremotecatchallnow(); - } else if (strcmp(TmpBuf2, "addlistmodnow") == 0 ) { + } else if (strcmp(command, "addlistmodnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); addlistgroupnow(1); - } else if (strcmp(TmpBuf2, "dellistmod") == 0 ) { + } else if (strcmp(command, "dellistmod") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); dellistgroup("del_listmod.html"); - } else if (strcmp(TmpBuf2, "dellistmodnow") == 0 ) { + } else if (strcmp(command, "dellistmodnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); dellistgroupnow(1); - } else if (strcmp(TmpBuf2, "addlistmod") == 0 ) { + } else if (strcmp(command, "addlistmod") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); addlistgroup("add_listmod.html"); - } else if (strcmp(TmpBuf2, "showlistmod") == 0 ) { + } else if (strcmp(command, "showlistmod") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); show_list_group("show_moderators.html"); - } else if (strcmp(TmpBuf2, "addlistdig") == 0 ) { + } else if (strcmp(command, "addlistdig") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); addlistgroup("add_listdig.html"); - } else if (strcmp(TmpBuf2, "addlistdignow") == 0 ) { + } else if (strcmp(command, "addlistdignow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); addlistgroupnow(2); - } else if (strcmp(TmpBuf2, "dellistdig") == 0 ) { + } else if (strcmp(command, "dellistdig") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); dellistgroup("del_listdig.html"); - } else if (strcmp(TmpBuf2, "dellistdignow") == 0 ) { + } else if (strcmp(command, "dellistdignow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); dellistgroupnow(2); - } else if (strcmp(TmpBuf2, "showlistdig") == 0 ) { + } else if (strcmp(command, "showlistdig") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); show_list_group("show_digest_subscribers.html"); - } else if (strcmp(TmpBuf2, "moduser") == 0 ) { + } else if (strcmp(command, "moduser") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); moduser(); - } else if (strcmp(TmpBuf2, "modusernow") == 0 ) { + } else if (strcmp(command, "modusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Password1, "password1=", sizeof(Password1)); GetValue(TmpCGI, Password2, "password2=", sizeof(Password2)); GetValue(TmpCGI, Gecos, "gecos=", sizeof(Gecos)); modusergo(); - } else if (strcmp(TmpBuf2, "deluser") == 0 ) { + } else if (strcmp(command, "deluser") == 0 ) { GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); deluser(); - } else if (strcmp(TmpBuf2, "delusernow") == 0 ) { + } else if (strcmp(command, "delusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); delusergo(); - } else if (strcmp(TmpBuf2, "moddotqmail") == 0 ) { + } else if (strcmp(command, "moddotqmail") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); moddotqmail(); - } else if (strcmp(TmpBuf2, "moddotqmailnow") == 0 ) { + } else if (strcmp(command, "moddotqmailnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); @@ -149,108 +150,108 @@ GetValue(TmpCGI, Action, "action=", sizeof(Action)); moddotqmailnow(); - } else if (strcmp(TmpBuf2, "deldotqmail") == 0 ) { + } else if (strcmp(command, "deldotqmail") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); deldotqmail(); - } else if (strcmp(TmpBuf2, "deldotqmailnow") == 0 ) { + } else if (strcmp(command, "deldotqmailnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); deldotqmailnow(); - } else if (strcmp(TmpBuf2, "adddotqmail") == 0 ) { + } else if (strcmp(command, "adddotqmail") == 0 ) { GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); adddotqmail(); - } else if (strcmp(TmpBuf2, "adddotqmailnow") == 0 ) { + } else if (strcmp(command, "adddotqmailnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); adddotqmailnow(); - } else if (strcmp(TmpBuf2, "addmailinglist") == 0 ) { + } else if (strcmp(command, "addmailinglist") == 0 ) { addmailinglist(); - } else if (strcmp(TmpBuf2, "delmailinglist") == 0 ) { + } else if (strcmp(command, "delmailinglist") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delmailinglist(); - } else if (strcmp(TmpBuf2, "delmailinglistnow") == 0 ) { + } else if (strcmp(command, "delmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delmailinglistnow(); - } else if (strcmp(TmpBuf2, "addlistusernow") == 0 ) { + } else if (strcmp(command, "addlistusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); addlistgroupnow(0); - } else if (strcmp(TmpBuf2, "dellistuser") == 0 ) { + } else if (strcmp(command, "dellistuser") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); dellistgroup("del_listuser.html"); - } else if (strcmp(TmpBuf2, "dellistusernow") == 0 ) { + } else if (strcmp(command, "dellistusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); dellistgroupnow(0); - } else if (strcmp(TmpBuf2, "addlistuser") == 0 ) { + } else if (strcmp(command, "addlistuser") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); addlistgroup("add_listuser.html"); - } else if (strcmp(TmpBuf2, "addmailinglistnow") == 0 ) { + } else if (strcmp(command, "addmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); addmailinglistnow(); - } else if (strcmp(TmpBuf2, "modmailinglist") == 0 ) { + } else if (strcmp(command, "modmailinglist") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); modmailinglist(); - } else if (strcmp(TmpBuf2, "modmailinglistnow") == 0 ) { + } else if (strcmp(command, "modmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); modmailinglistnow(); - } else if (strcmp(TmpBuf2, "modautorespond") == 0 ) { + } else if (strcmp(command, "modautorespond") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); modautorespond(); - } else if (strcmp(TmpBuf2, "addautorespond") == 0 ) { + } else if (strcmp(command, "addautorespond") == 0 ) { addautorespond(); - } else if (strcmp(TmpBuf2, "addautorespondnow") == 0 ) { + } else if (strcmp(command, "addautorespondnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); GetValue(TmpCGI, Message, "message=", sizeof(Message)); GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); addautorespondnow(); - } else if (strcmp(TmpBuf2, "modautorespondnow") == 0 ) { + } else if (strcmp(command, "modautorespondnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); GetValue(TmpCGI, Message, "message=", sizeof(Message)); GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); modautorespondnow(); - } else if (strcmp(TmpBuf2, "showlistusers") == 0 ) { + } else if (strcmp(command, "showlistusers") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); show_list_group("show_subscribers.html"); - } else if (strcmp(TmpBuf2, "setdefault") == 0 ) { + } else if (strcmp(command, "setdefault") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); setdefaultaccount(); - } else if (strcmp(TmpBuf2, "delautorespond") == 0 ) { + } else if (strcmp(command, "delautorespond") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delautorespond(); - } else if (strcmp(TmpBuf2, "delautorespondnow") == 0 ) { + } else if (strcmp(command, "delautorespondnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delautorespondnow(); - } else if (strcmp(TmpBuf2, "logout") == 0 ) { - sprintf(TmpBuf, "%s/%s/Maildir", RealDir, Username ); - del_id_files(TmpBuf); + } else if (strcmp(command, "logout") == 0 ) { + sprintf(Buffer, "%s/%s/Maildir", RealDir, Username ); + del_id_files(Buffer); show_login(); } Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure 30 Jan 2004 03:28:19 -0000 1.15 +++ configure 30 Jan 2004 08:30:58 -0000 1.16 @@ -1,11 +1,19 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.53. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + +if expr a : '\(a\)' >/dev/null 2>&1; then [...2540 lines suppressed...] + { (exit 1); exit 1; }; } + ;; + esac +done; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" @@ -6528,11 +6237,8 @@ # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. Index: forward.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/forward.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- forward.c 30 Jan 2004 06:45:08 -0000 1.4 +++ forward.c 30 Jan 2004 08:30:58 -0000 1.5 @@ -37,12 +37,13 @@ { if (AdminType != DOMAIN_ADMIN) { - fprintf(stderr,"%s", get_html_text("142")); + fprintf(stderr, "%s", get_html_text("142")); vclose(); exit(0); } if(CurForwards == 0) { + fprintf(stderr, "%s", get_html_text("232")); sprintf(StatusMessage,"%s", get_html_text("232")); show_menu(Username, Domain, Mytime); vclose(); Index: mailinglist.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/mailinglist.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mailinglist.c 30 Jan 2004 03:28:19 -0000 1.6 +++ mailinglist.c 30 Jan 2004 08:30:58 -0000 1.7 @@ -46,6 +46,7 @@ int show_mailing_lists(char *user, char *dom, time_t mytime) { + if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); vclose(); @@ -73,6 +74,7 @@ FILE *fs; char *addr; char testfn[MAX_FILE_NAME]; + char Buffer[MAX_BUFF]; int i,j; if ( AdminType!=DOMAIN_ADMIN ) { @@ -105,9 +107,9 @@ send_template_now("show_error_line.html"); continue; } - fgets(TmpBuf2, sizeof(TmpBuf2), fs); + fgets(Buffer, sizeof(Buffer), fs); fclose(fs); - if ( strstr( TmpBuf2, "ezmlm-reject") != 0 ) { + if ( strstr( Buffer, "ezmlm-reject") != 0 ) { sort_add_entry (&mydirent->d_name[7], 0); } } @@ -154,10 +156,12 @@ int is_mailing_list(FILE *fs) { + char Buffer[MAX_BUFF]; + while (!feof(fs)) { - fgets( TmpBuf2, sizeof(TmpBuf2), fs); - if ( strstr( TmpBuf2, "ezmlm-reject") != 0 || - strstr( TmpBuf2, "ezmlm-send") != 0 ) + fgets( Buffer, sizeof(Buffer), fs); + if ( strstr( Buffer, "ezmlm-reject") != 0 || + strstr( Buffer, "ezmlm-send") != 0 ) return -1; } return 0; @@ -172,6 +176,7 @@ char *addr; int i,j; int listcount; + char Buffer[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -197,9 +202,9 @@ fprintf(stderr,"SMLL3 %s %s\n", get_html_text("144"), mydirent->d_name); continue; } - fgets( TmpBuf2, sizeof(TmpBuf2), fs); + fgets( Buffer, sizeof(Buffer), fs); fclose(fs); - if ( strstr( TmpBuf2, "ezmlm-reject") != 0 ) { + if ( strstr( Buffer, "ezmlm-reject") != 0 ) { sort_add_entry (&mydirent->d_name[7], 0); listcount++; } @@ -273,6 +278,8 @@ int pid; DIR *mydir; struct dirent *mydirent; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -292,28 +299,28 @@ if(dotqmail_name[dotnum]=='.') dotqmail_name[dotnum] = ':'; } - sprintf(TmpBuf2, ".qmail-%s", dotqmail_name); - sprintf(TmpBuf3, ".qmail-%s-", dotqmail_name); + sprintf(Buffer2, ".qmail-%s", dotqmail_name); + sprintf(Buffer1, ".qmail-%s-", dotqmail_name); while( (mydirent=readdir(mydir)) != NULL ) { /* delete the main .qmail-"list" file */ - if ( strcmp(TmpBuf2, mydirent->d_name) == 0 ) { + if ( strcmp(Buffer2, mydirent->d_name) == 0 ) { if ( unlink(mydirent->d_name) != 0 ) { - ack(get_html_text("185"), TmpBuf2); + ack(get_html_text("185"), Buffer2); } /* delete secondary .qmail-"list"-* files */ - } else if ( strncmp(TmpBuf3, mydirent->d_name, strlen(TmpBuf3)) == 0 ) { + } else if ( strncmp(Buffer1, mydirent->d_name, strlen(Buffer1)) == 0 ) { if ( unlink(mydirent->d_name) != 0 ) { - ack(get_html_text("185"), TmpBuf2); + ack(get_html_text("185"), Buffer2); } } } closedir(mydir); - sprintf(TmpBuf2, "%s/%s", RealDir, ActionUser); - vdelfiles(TmpBuf2); + sprintf(Buffer2, "%s/%s", RealDir, ActionUser); + vdelfiles(Buffer2); sprintf(StatusMessage, "%s %s\n", get_html_text("186"), ActionUser); if ( CurMailingLists == 0 ) { @@ -361,8 +368,12 @@ ezmlm_make (int newlist) { - FILE * file; - int pid; + FILE * file; + int pid; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; + char Buffer4[MAX_BUFF]; #ifdef EZMLMIDX char list_owner[MAX_BUFF]; @@ -470,17 +481,17 @@ } pid=fork(); if (pid==0) { - sprintf(TmpBuf1, "%s/ezmlm-make", EZMLMDIR); - sprintf(TmpBuf2, "%s/%s", RealDir, ActionUser); - sprintf(TmpBuf3, "%s/.qmail-%s", RealDir, dotqmail_name); + sprintf(Buffer1, "%s/ezmlm-make", EZMLMDIR); + sprintf(Buffer2, "%s/%s", RealDir, ActionUser); + sprintf(Buffer3, "%s/.qmail-%s", RealDir, dotqmail_name); - arguments[argc++]=TmpBuf2; - arguments[argc++]=TmpBuf3; + arguments[argc++]=Buffer2; + arguments[argc++]=Buffer3; arguments[argc++]=ActionUser; arguments[argc++]=Domain; arguments[argc]=NULL; - execv(TmpBuf1, arguments); + execv(Buffer1, arguments); exit(127); } else { wait(&pid); @@ -519,10 +530,10 @@ while (*tmpstr == '[') tmpstr++; /* Create (or delete) the file as appropriate */ - sprintf(TmpBuf, "%s/%s/prefix", RealDir, ActionUser); + sprintf(Buffer4, "%s/%s/prefix", RealDir, ActionUser); if (strlen(tmp) > 0) { - file=fopen(TmpBuf , "w"); + file=fopen(Buffer4 , "w"); if (file) { fprintf(file, "[%s]", tmpstr); @@ -531,12 +542,12 @@ } else { - unlink (TmpBuf); + unlink (Buffer4); } /* set Reply-To header */ - GetValue (TmpCGI, TmpBuf, "replyto=", sizeof(TmpBuf)); - replyto = atoi(TmpBuf); + GetValue (TmpCGI, Buffer4, "replyto=", sizeof(Buffer4)); + replyto = atoi(Buffer4); if (replyto == REPLYTO_SENDER) { /* ezmlm shouldn't remove/add Reply-To header */ ezmlm_setreplyto ("headeradd", ""); @@ -544,17 +555,17 @@ } else { if (replyto == REPLYTO_ADDRESS) { GetValue (TmpCGI, replyto_addr, "replyaddr=", sizeof(replyto_addr)); - sprintf (TmpBuf, "Reply-To: %s\n", replyto_addr); + sprintf (Buffer4, "Reply-To: %s\n", replyto_addr); } else { /* REPLYTO_LIST */ - strcpy (TmpBuf, "Reply-To: <#l#>@<#h#>\n"); + strcpy (Buffer4, "Reply-To: <#l#>@<#h#>\n"); } - ezmlm_setreplyto ("headeradd", TmpBuf); + ezmlm_setreplyto ("headeradd", Buffer4); ezmlm_setreplyto ("headerremove", "Reply-To"); } /* update inlocal file */ - sprintf(TmpBuf, "%s/%s/inlocal", RealDir, ActionUser); - if (file=fopen(TmpBuf, "w")) { + sprintf(Buffer4, "%s/%s/inlocal", RealDir, ActionUser); + if (file=fopen(Buffer4, "w")) { fprintf(file, "%s-%s", Domain, ActionUser); fclose(file); } @@ -586,6 +597,10 @@ int show_list_group_now(int mod) { + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; + /* mod = 0 for subscribers, 1 for moderators, 2 for digest users */ FILE *fs; @@ -606,15 +621,15 @@ if (pid==0) { close(handles[0]); dup2(handles[1],fileno(stdout)); - sprintf(TmpBuf1, "%s/ezmlm-list", EZMLMDIR); + sprintf(Buffer1, "%s/ezmlm-list", EZMLMDIR); if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/mod", RealDir, ActionUser); } else if(mod == 2) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/digest", RealDir, ActionUser); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/", RealDir, ActionUser); } - execl(TmpBuf1, "ezmlm-list", TmpBuf2, NULL); + execl(Buffer1, "ezmlm-list", Buffer2, NULL); exit(127); } else { close(handles[1]); @@ -632,43 +647,43 @@ /* Display subscriber/moderator/digest list, along with delete button */ if(mod == 1) { - strcpy(TmpBuf, "228"); strcpy(TmpBuf1, "220"); - /* strcpy(TmpBuf2, "087"); */ + strcpy(Buffer3, "228"); strcpy(Buffer1, "220"); + /* strcpy(Buffer2, "087"); */ } else if(mod == 2) { - strcpy(TmpBuf, "244"); strcpy(TmpBuf1, "246"); - /* strcpy(TmpBuf2, "245"); */ + strcpy(Buffer3, "244"); strcpy(Buffer1, "246"); + /* strcpy(Buffer2, "245"); */ } else { - strcpy(TmpBuf, "230"); strcpy(TmpBuf1, "222"); - /* strcpy(TmpBuf2, "084"); */ + strcpy(Buffer3, "230"); strcpy(Buffer1, "222"); + /* strcpy(Buffer2, "084"); */ } - strcpy(TmpBuf2, "072"); + strcpy(Buffer2, "072"); fprintf(actout,"<TABLE border=0 width=\"100%%\">\n"); fprintf(actout," <TR>\n"); - fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(TmpBuf), subuser_count); + fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(Buffer3), subuser_count); fprintf(actout," </TR>\n"); fprintf(actout," <TR align=center bgcolor=%s>\n", get_color_text("002")); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf2)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf1)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf2)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf1)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); fprintf(actout," </TR>\n"); if(mod == 1) { - strcpy(TmpBuf, "dellistmodnow"); + strcpy(Buffer3, "dellistmodnow"); } else if(mod == 2) { - strcpy(TmpBuf, "dellistdignow"); + strcpy(Buffer3, "dellistdignow"); } else { - strcpy(TmpBuf, "dellistusernow"); + strcpy(Buffer3, "dellistusernow"); } for(z = 0; addr = sort_get_entry(z); ++z) { fprintf(actout," <TR align=center>"); fprintf(actout," <TD align=right><A href=\"%s/com/%s?modu=%s&newu=%s&dom=%s&user=%s&time=%d\"><IMG src=\"%s/trash.png\" border=0></A></TD>\n", - CGIPATH, TmpBuf, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); + CGIPATH, Buffer3, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); fprintf(actout," <TD align=left>%s</TD>\n", addr); ++z; if(addr = sort_get_entry(z)) { fprintf(actout," <TD align=right><A href=\"%s/com/%s?modu=%s&newu=%s&dom=%s&user=%s&time=%d\"><IMG src=\"%s/trash.png\" border=0></A></TD>\n", - CGIPATH, TmpBuf, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); + CGIPATH, Buffer3, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); fprintf(actout," <TD align=left>%s</TD>\n", addr); } else { fprintf(actout," <TD COLSPAN=2> </TD>"); @@ -731,6 +746,9 @@ addlistgroupnow (int mod) { +char Buffer1[MAX_BUFF]; +char Buffer2[MAX_BUFF]; + // mod = 0 for subscribers, 1 for moderators, 2 for digest subscribers int i, result; @@ -759,15 +777,15 @@ pid=fork(); if (pid==0) { - sprintf(TmpBuf1, "%s/ezmlm-sub", EZMLMDIR); + sprintf(Buffer1, "%s/ezmlm-sub", EZMLMDIR); if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/mod", RealDir, ActionUser); } else if(mod == 2) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/digest", RealDir, ActionUser); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/", RealDir, ActionUser); } - execl(TmpBuf1, "ezmlm-sub", TmpBuf2, Newu, NULL); + execl(Buffer1, "ezmlm-sub", Buffer2, Newu, NULL); exit(127); } else wait(&pid); @@ -809,10 +827,13 @@ dellistmod() { dellistgroup ( "del_listmod.html" ); } dellistdig() { dellistgroup ( "del_listdig.html" ); } + dellistgroupnow(int mod) { int i; int pid; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -824,15 +845,15 @@ pid=fork(); if (pid==0) { - sprintf(TmpBuf1, "%s/ezmlm-unsub", EZMLMDIR); + sprintf(Buffer1, "%s/ezmlm-unsub", EZMLMDIR); if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/mod", RealDir, ActionUser); } else if(mod == 2 ) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/digest", RealDir, ActionUser); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/", RealDir, ActionUser); } - execl(TmpBuf1, "ezmlm-unsub", TmpBuf2, Newu, NULL); + execl(Buffer1, "ezmlm-unsub", Buffer2, Newu, NULL); exit(127); } else wait(&pid); @@ -860,8 +881,11 @@ modmailinglist() { /* name of list to modify is stored in ActionUser */ + int i; FILE *fs; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -874,12 +898,12 @@ /* get the current listowner and copy it to Alias */ strcpy (dotqmail_name, ActionUser); str_replace (dotqmail_name, '.', ':'); - sprintf(TmpBuf, ".qmail-%s-owner", dotqmail_name); - if((fs=fopen(TmpBuf, "r"))!=NULL) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if(strstr(TmpBuf2, "@")!=NULL) { + sprintf(Buffer1, ".qmail-%s-owner", dotqmail_name); + if((fs=fopen(Buffer1, "r"))!=NULL) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if(strstr(Buffer2, "@")!=NULL) { /* strip leading & if present */ - sprintf(Alias, "%s", (*TmpBuf2 == '&' ? (TmpBuf2 + 1) : TmpBuf2) ); + sprintf(Alias, "%s", (*Buffer2 == '&' ? (Buffer2 + 1) : Buffer2) ); i = strlen(Alias); --i; Alias[i] = '\0'; /* strip newline */ } } @@ -889,17 +913,17 @@ /* set default to "replies go to original sender" */ replyto = REPLYTO_SENDER; /* default */ *replyto_addr = '\0'; - sprintf(TmpBuf, "%s/headeradd", ActionUser); + sprintf(Buffer1, "%s/headeradd", ActionUser); /* get the Reply-To setting for the list */ - if ((fs = fopen (TmpBuf, "r")) != NULL) { - while (fgets (TmpBuf2, sizeof(TmpBuf2), fs)) { - if (strncasecmp ("Reply-To: ", TmpBuf2, 10) == 0) { - i = strlen(TmpBuf2); --i; TmpBuf2[i] = '\0'; /* strip newline */ - if (strcmp ("<#l#>@<#h#>", TmpBuf2 + 10) == 0) { + if ((fs = fopen (Buffer1, "r")) != NULL) { + while (fgets (Buffer2, sizeof(Buffer2), fs)) { + if (strncasecmp ("Reply-To: ", Buffer2, 10) == 0) { + i = strlen(Buffer2); --i; Buffer2[i] = '\0'; /* strip newline */ + if (strcmp ("<#l#>@<#h#>", Buffer2 + 10) == 0) { replyto = REPLYTO_LIST; } else { replyto = REPLYTO_ADDRESS; - strcpy (replyto_addr, TmpBuf2 + 10); + strcpy (replyto_addr, Buffer2 + 10); } } } @@ -989,6 +1013,8 @@ void set_options() { char c; FILE *fs; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; /* * Note that with ezmlm-idx it might be possible to replace most @@ -1005,28 +1031,28 @@ for (c = 'a'; c <= 'z'; checkopt[c++] = 0); // figure out some options in the -default file - sprintf(TmpBuf, ".qmail-%s-default", dotqmail_name); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-get", 'P')) > 0) { + sprintf(Buffer1, ".qmail-%s-default", dotqmail_name); + if( (fs=fopen(Buffer1, "r")) !=NULL ) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-get", 'P')) > 0) { checkopt['b'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-get", 's')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-get", 's')) > 0) { checkopt['g'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'S')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'S')) > 0) { checkopt['h'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'U')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'U')) > 0) { checkopt['j'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'l')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'l')) > 0) { checkopt['l'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'e')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'e')) > 0) { checkopt['n'] = 1; } - if((strstr(TmpBuf2, "ezmlm-request")) != 0) { + if((strstr(Buffer2, "ezmlm-request")) != 0) { checkopt['q'] = 1; } } @@ -1034,10 +1060,10 @@ } // figure out some options in the -accept-default file - sprintf(TmpBuf, ".qmail-%s-accept-default", dotqmail_name); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if(strstr(TmpBuf2, "ezmlm-archive") !=0) { + sprintf(Buffer1, ".qmail-%s-accept-default", dotqmail_name); + if( (fs=fopen(Buffer1, "r")) !=NULL ) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if(strstr(Buffer2, "ezmlm-archive") !=0) { checkopt['i'] = 1; } } @@ -1045,45 +1071,45 @@ } // figure out some options in the qmail file - sprintf(TmpBuf, ".qmail-%s", dotqmail_name); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-store", 'P')) > 0) { + sprintf(Buffer1, ".qmail-%s", dotqmail_name); + if( (fs=fopen(Buffer1, "r")) !=NULL ) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-store", 'P')) > 0) { checkopt['o'] = 1; } - if((strstr(TmpBuf2, "ezmlm-gate")) != 0 || (strstr(TmpBuf2, "ezmlm-issubn")) != 0) { + if((strstr(Buffer2, "ezmlm-gate")) != 0 || (strstr(Buffer2, "ezmlm-issubn")) != 0) { checkopt['u'] = 1; } - if(strstr(TmpBuf2, "ezmlm-archive") !=0) { + if(strstr(Buffer2, "ezmlm-archive") !=0) { checkopt['i'] = 1; } } fclose(fs); } - sprintf(TmpBuf, ".qmail-%s-accept-default", dotqmail_name); - checkopt['m'] = file_exists(TmpBuf); + sprintf(Buffer1, ".qmail-%s-accept-default", dotqmail_name); + checkopt['m'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/archived", ActionUser); - checkopt['a'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/archived", ActionUser); + checkopt['a'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/digest/bouncer", ActionUser); - checkopt['d'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/digest/bouncer", ActionUser); + checkopt['d'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/prefix", ActionUser); - checkopt['f'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/prefix", ActionUser); + checkopt['f'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/public", ActionUser); - checkopt['p'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/public", ActionUser); + checkopt['p'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/remote", ActionUser); - checkopt['r'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/remote", ActionUser); + checkopt['r'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/modsub", ActionUser); - checkopt['s'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/modsub", ActionUser); + checkopt['s'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/text/trailer", ActionUser); - checkopt['t'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/text/trailer", ActionUser); + checkopt['t'] = file_exists(Buffer1); /* update the uppercase option letters (just the opposite of the lowercase) */ for (c = 'A'; c <= 'Z'; c++) @@ -1146,6 +1172,10 @@ char checked1[MAX_BUFF] = ""; char listname[128]; int checked; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; + char Buffer4[MAX_BUFF]; /* Note that we do not support the following list options: * k - posts from addresses in listname/deny are rejected @@ -1185,8 +1215,8 @@ fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("268")); /* this next option isn't necessary since we use the edit box to * set/delete the prefix - sprintf (TmpBuf, get_html_text("269"), listname); - build_option_str ("CHECKBOX", "opt3", "f", TmpBuf); + sprintf (Buffer4, get_html_text("269"), listname); + build_option_str ("CHECKBOX", "opt3", "f", Buffer4); fprintf(actout, "<BR>\n"); */ fprintf(actout, "<TABLE><TR><TD ROWSPAN=3 VALIGN=TOP>%s</TD>", @@ -1203,14 +1233,14 @@ build_option_str ("CHECKBOX", "opt4", "t", get_html_text("270")); fprintf(actout, "<BR>\n"); build_option_str ("CHECKBOX", "opt5", "d", get_html_text("271")); - sprintf (TmpBuf, get_html_text("272"), listname); - fprintf(actout, "<SMALL>(%s)</SMALL>", TmpBuf); + sprintf (Buffer4, get_html_text("272"), listname); + fprintf(actout, "<SMALL>(%s)</SMALL>", Buffer4); fprintf(actout, "<BR>\n"); - sprintf (TmpBuf, get_html_text("273"), listname); - build_option_str ("CHECKBOX", "opt6", "q", TmpBuf); + sprintf (Buffer4, get_html_text("273"), listname); + build_option_str ("CHECKBOX", "opt6", "q", Buffer4); fprintf(actout, "<BR>\n"); - sprintf (TmpBuf, get_html_text("274"), listname, listname, listname); - fprintf(actout, " <SMALL>(%s)</SMALL></P>", TmpBuf); + sprintf (Buffer4, get_html_text("274"), listname, listname, listname); + fprintf(actout, " <SMALL>(%s)</SMALL></P>", Buffer4); /* Remote Administration */ fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("275")); @@ -1258,13 +1288,13 @@ /* See if sql is turned on */ checked = 0; - sprintf(TmpBuf, "%s/sql", ActionUser); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { + sprintf(Buffer4, "%s/sql", ActionUser); + if( (fs=fopen(Buffer4, "r")) !=NULL ) { checked = 1; - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - strcpy(TmpBuf1, TmpBuf2); - i = strlen(TmpBuf1); --i; TmpBuf1[i] = 0; /* take off newline */ - if((strstr(TmpBuf1, ":")) != NULL) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + strcpy(Buffer1, Buffer2); + i = strlen(Buffer1); --i; Buffer1[i] = 0; /* take off newline */ + if((strstr(Buffer1, ":")) != NULL) { sqlfileok = 1; } } @@ -1286,9 +1316,9 @@ /* get hostname */ strcpy(checked1, "localhost"); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, TmpBuf1, 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(i=0,j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, Buffer1, 1); + if((strstr(Buffer3, ":")) == NULL) { + for(i=0,j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1305,9 +1335,9 @@ /* get port */ strcpy(checked1, "3306"); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1323,9 +1353,9 @@ /* get user */ strcpy(checked1, ""); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1341,9 +1371,9 @@ /* get password */ strcpy(checked1, ""); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1359,9 +1389,9 @@ /* get database name */ strcpy(checked1, ""); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1378,8 +1408,8 @@ strcpy(checked1, "ezmlm"); if(usesql == 1 && sqlfileok == 1) { ++i; - if(strlen(TmpBuf1) != i) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + if(strlen(Buffer1) != i) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1404,8 +1434,7 @@ sprintf(buffer, "%s/%s/prefix", RealDir, ActionUser); file=fopen(buffer , "r"); - if (file) - { + if (file) { fgets(buffer, sizeof(buffer), file); fclose(file); Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- qmailadmin.c 30 Jan 2004 06:45:08 -0000 1.8 +++ qmailadmin.c 30 Jan 2004 08:30:58 -0000 1.9 @@ -59,11 +59,6 @@ char SearchUser[MAX_BUFF]; time_t Mytime; char *TmpCGI = NULL; -char TmpBuf[MAX_BIG_BUFF]; -char TmpBuf1[MAX_BUFF]; -char TmpBuf2[MAX_BUFF]; -char TmpBuf3[MAX_BUFF]; -char TempBuf[MAX_BUFF]; int Compressed; FILE *actout; @@ -133,6 +128,11 @@ char returnhttp[MAX_BUFF]; char returntext[MAX_BUFF]; + char TmpBuf[MAX_BIG_BUFF]; + char TmpBuf1[MAX_BUFF]; + char TmpBuf2[MAX_BUFF]; + char TmpBuf3[MAX_BUFF]; + init_globals(); if (x_forward) ip_addr = x_forward; @@ -174,7 +174,6 @@ fprintf(stderr, "MAIN %s %s\n", get_html_text("171"), RealDir ); } set_admin_type(); - fprintf( stderr, "in main before count_stuff\n" ); count_stuff(); if ( AdminType == USER_ADMIN || AdminType == DOMAIN_ADMIN ) { @@ -183,9 +182,7 @@ auth_system(ip_addr, pw); } - fprintf( stderr, "in main before process_commands\n" ); - process_commands(); - fprintf( stderr, "in main after process_commands\n" ); + process_commands(TmpBuf2); } else { char *rm; @@ -316,10 +313,6 @@ memset(Crypted, 0, sizeof(Crypted)); memset(Alias, 0, sizeof(Alias)); memset(Message, 0, sizeof(Message)); - memset(TmpBuf, 0, sizeof(TmpBuf)); - memset(TmpBuf1, 0, sizeof(TmpBuf1)); - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - memset(TmpBuf3, 0, sizeof(TmpBuf3)); AdminType = NO_ADMIN; @@ -399,14 +392,15 @@ DIR *mydir; struct dirent *mydirent; struct stat statbuf; + char Buffer[MAX_BUFF]; mydir = opendir(dirname); if ( mydir == NULL ) return; while((mydirent=readdir(mydir))!=NULL){ if ( strstr(mydirent->d_name,".qw")!=0 ) { - sprintf(TmpBuf3, "%s/%s", dirname, mydirent->d_name); - unlink(TmpBuf3); + sprintf(Buffer, "%s/%s", dirname, mydirent->d_name); + unlink(Buffer); } } closedir(mydir); Index: qmailadminx.h =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadminx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- qmailadminx.h 30 Jan 2004 03:28:19 -0000 1.3 +++ qmailadminx.h 30 Jan 2004 08:30:58 -0000 1.4 @@ -40,11 +40,6 @@ extern char SearchUser[MAX_BUFF]; extern time_t Mytime; extern char *TmpCGI; -extern char TmpBuf[MAX_BIG_BUFF]; -extern char TmpBuf1[MAX_BUFF]; -extern char TmpBuf2[MAX_BUFF]; -extern char TmpBuf3[MAX_BUFF]; -extern char TempBuf[MAX_BUFF]; extern int Compressed; extern FILE *actout; Index: show.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/show.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- show.c 10 Oct 2003 16:36:24 -0000 1.2 +++ show.c 30 Jan 2004 08:30:58 -0000 1.3 @@ -34,7 +34,7 @@ char *dom; time_t mytime; { - send_template( "main_menu.html" ); + send_template( "menu_main.html" ); } show_login() Index: template.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/template.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- template.c 30 Jan 2004 03:28:19 -0000 1.8 +++ template.c 30 Jan 2004 08:30:58 -0000 1.9 @@ -103,7 +103,7 @@ /* open the template */ fs = fopen( fqfn, "r" ); if (fs == NULL) { - fprintf(stderr,"STN1 %s %s\n", get_html_text("144"), fqfn); + fprintf(stderr,"%s %s\n", get_html_text("144"), fqfn); return 144; } @@ -146,6 +146,7 @@ } break; + ... [truncated message content] |