From: Tom C. <tom...@us...> - 2004-10-01 19:47:28
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16349 Modified Files: Tag: stable-1_2 ChangeLog command.c Log Message: Fix error handling when attempting to set catchall (if vauth_getpw() failed, we'd end up with an empty .qmail-default). Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15.2.20 retrieving revision 1.15.2.21 diff -u -d -r1.15.2.20 -r1.15.2.21 --- ChangeLog 29 Sep 2004 16:28:43 -0000 1.15.2.20 +++ ChangeLog 1 Oct 2004 19:45:21 -0000 1.15.2.21 @@ -19,6 +19,8 @@ it's for a mailing list and isn't an alias. Note that this only affects systems that don't store aliases in the valias table and reverts to pre-1.2.2 behavior. [992132] + - Fix error handling when attempting to set catchall (if + vauth_getpw() failed, we'd end up with an empty .qmail-default). 1.2.2 - released 25-Jun-04 Index: command.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/command.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- command.c 10 Oct 2003 16:36:24 -0000 1.2 +++ command.c 1 Oct 2004 19:45:31 -0000 1.2.2.1 @@ -272,15 +272,15 @@ int i; int j; - if ( (fs = fopen(".qmail-default", "w")) == NULL ) { - sprintf(StatusMessage,"%s", get_html_text("082")); + if ((pw = vauth_getpw( ActionUser, Domain )) == NULL) { + sprintf(StatusMessage,"%s %s@%s", get_html_text("223"), ActionUser, Domain); } else { - if ((pw = vauth_getpw( ActionUser, Domain )) == NULL) { - sprintf(StatusMessage,"%s %s@%s", get_html_text("223"), ActionUser, Domain); + if ( (fs = fopen(".qmail-default", "w")) == NULL ) { + sprintf(StatusMessage,"%s", get_html_text("082")); } else { fprintf(fs, "| %s/bin/vdelivermail '' %s\n", VPOPMAILDIR, pw->pw_dir); + fclose(fs); } - fclose(fs); } show_users(Username, Domain, Mytime); vclose(); |