from 8-bit clean conversion
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 5.34
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.109
-static char sccsid[] = "@(#)recipient.c 5.33 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c 5.34 (Berkeley) %G%";
#endif /* not lint */
# include <sys/types.h>
#endif /* not lint */
# include <sys/types.h>
+ if (tTd(29, 7))
+ printf("at trylocaluser %s\n", a->q_user);
+
if (m == LocalMailer && !bitset(QDONTSEND, a->q_flags))
{
if (strncmp(a->q_user, ":include:", 9) == 0)
if (m == LocalMailer && !bitset(QDONTSEND, a->q_flags))
{
if (strncmp(a->q_user, ":include:", 9) == 0)
if (!bitset(QDONTSEND, a->q_flags))
{
if (!bitset(QDONTSEND, a->q_flags))
{
register struct passwd *pw;
extern struct passwd *finduser();
/* warning -- finduser may trash buf */
register struct passwd *pw;
extern struct passwd *finduser();
/* warning -- finduser may trash buf */
+ pw = finduser(buf, &fuzzy);
if (pw == NULL)
{
a->q_flags |= QBADADDR;
if (pw == NULL)
{
a->q_flags |= QBADADDR;
- if (strcmp(a->q_user, pw->pw_name) != 0)
{
/* name was a fuzzy match */
a->q_user = newstr(pw->pw_name);
{
/* name was a fuzzy match */
a->q_user = newstr(pw->pw_name);
**
** Parameters:
** name -- the name to match against.
**
** Parameters:
** name -- the name to match against.
+** fuzzyp -- an outarg that is set to TRUE if this entry
+** was found using the fuzzy matching algorithm;
+** set to FALSE otherwise.
**
** Returns:
** A pointer to a pw struct.
**
** Returns:
** A pointer to a pw struct.
{
register struct passwd *pw;
register char *p;
extern struct passwd *getpwent();
extern struct passwd *getpwnam();
{
register struct passwd *pw;
register char *p;
extern struct passwd *getpwent();
extern struct passwd *getpwnam();
+ if (tTd(29, 4))
+ printf("finduser(%s): ", name);
+
/* map upper => lower case */
for (p = name; *p != '\0'; p++)
{
if (isascii(*p) && isupper(*p))
*p = tolower(*p);
}
/* map upper => lower case */
for (p = name; *p != '\0'; p++)
{
if (isascii(*p) && isupper(*p))
*p = tolower(*p);
}
/* look up this login name using fast path */
if ((pw = getpwnam(name)) != NULL)
/* look up this login name using fast path */
if ((pw = getpwnam(name)) != NULL)
+ {
+ if (tTd(29, 4))
+ printf("found (non-fuzzy)\n");
#ifdef MATCHGECOS
/* see if fuzzy matching allowed */
if (!MatchGecos)
#ifdef MATCHGECOS
/* see if fuzzy matching allowed */
if (!MatchGecos)
+ {
+ if (tTd(29, 4))
+ printf("not found (fuzzy disabled)\n");
/* search for a matching full name instead */
for (p = name; *p != '\0'; p++)
/* search for a matching full name instead */
for (p = name; *p != '\0'; p++)
fullname(pw, buf);
if (index(buf, ' ') != NULL && !strcasecmp(buf, name))
{
fullname(pw, buf);
if (index(buf, ' ') != NULL && !strcasecmp(buf, name))
{
+ if (tTd(29, 4))
+ printf("fuzzy matches %s\n", pw->pw_name);
message(Arpa_Info, "sending to %s <%s>",
buf, pw->pw_name);
return (pw);
}
}
#endif
message(Arpa_Info, "sending to %s <%s>",
buf, pw->pw_name);
return (pw);
}
}
#endif
+ if (tTd(29, 4))
+ printf("no fuzzy match found\n");
-static char sccsid[] = "@(#)version.c 5.108 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c 5.109 (Berkeley) %G%";
-char Version[] = "5.108";
+char Version[] = "5.109";