SCCS-vsn: usr.sbin/sendmail/src/udb.c 5.13
#ifndef lint
#ifdef USERDB
#ifndef lint
#ifdef USERDB
-static char sccsid [] = "@(#)udb.c 5.12 (Berkeley) %G% (with USERDB)";
+static char sccsid [] = "@(#)udb.c 5.13 (Berkeley) %G% (with USERDB)";
-static char sccsid [] = "@(#)udb.c 5.12 (Berkeley) %G% (without USERDB)";
+static char sccsid [] = "@(#)udb.c 5.13 (Berkeley) %G% (without USERDB)";
printf("expand(%s)\n", a->q_paddr);
/* make certain we are supposed to send to this address */
printf("expand(%s)\n", a->q_paddr);
/* make certain we are supposed to send to this address */
- if (bitset(QDONTSEND, a->q_flags) ||
- UdbSpec == NULL || UdbSpec[0] == '\0')
+ if (bitset(QDONTSEND, a->q_flags))
return;
CurEnv->e_to = a->q_paddr;
return;
CurEnv->e_to = a->q_paddr;
+ /* short circuit the process if no chance of a match */
+ if (UdbSpec == NULL || UdbSpec[0] == '\0')
+ return;
+
/* if name is too long, assume it won't match */
if (strlen(a->q_user) > sizeof keybuf - 12)
return;
/* if name is too long, assume it won't match */
if (strlen(a->q_user) > sizeof keybuf - 12)
return;