From owner-freebsd-questions Fri Apr 30 10: 9:17 1999 Delivered-To: freebsd-questions@freebsd.org Received: from postoffice.onu.edu (postoffice.onu.edu [140.228.10.2]) by hub.freebsd.org (Postfix) with ESMTP id 5200015A75 for ; Fri, 30 Apr 1999 10:08:39 -0700 (PDT) (envelope-from r-beer@onu.edu) Received: from [140.228.15.35] (asterion.onu.edu [140.228.15.35]) by postoffice.onu.edu (8.8.8/8.8.8) with ESMTP id NAA26168; Fri, 30 Apr 1999 13:08:36 -0400 (EDT) (envelope-from r-beer@onu.edu) Message-Id: In-Reply-To: <37298025.35D8AA73@prime.net.ua> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Apr 1999 13:11:16 -0400 To: freebsd-questions@freebsd.org From: Robert Beer Subject: Re: Sendmail and Eight Character Username Strangeness Cc: "Andy V. Oleynik" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 6:04 AM -0400 4/30/1999, Andy V. Oleynik wrote: >It may be caused by system effectively cutting username to 8 character. >Robert Beer wrote: I think this is the root problem. Take a look at: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D11024 A little investigation of getpwent.c finds this: getpwnam(name) const char *name; { DBT key; int len, rval; char bf[UT_NAMESIZE + 2]; if (!_pw_db && !__initdb()) return((struct passwd *)NULL); bf[0] =3D _PW_KEYBYNAME; len =3D MIN(strlen(name), UT_NAMESIZE); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Any username > 8 is truncated to 8 bcopy(name, bf + 1, len); key.data =3D (u_char *)bf; key.size =3D len + 1; rval =3D __hashpw(&key); #ifdef YP if (!rval && _yp_enabled) rval =3D _getyppass(&_pw_passwd, name, "passwd.byname"); #endif /* * Prevent login attempts when YP is not enabled but YP entries * are in /etc/master.passwd. */ if (rval && (_pw_passwd.pw_name[0] =3D=3D '+'|| _pw_passwd.pw_name[0] =3D=3D '-')) rval =3D 0; endpwent(); return(rval ? &_pw_passwd : (struct passwd *)NULL); } Would the correct fix be to substitute MAXLOGNAME - 1 for UT_NAMESIZE above?= I am kind of flying by the seat of my pants here. >> I just noticed something really strange on a 2.2.8 system. If I have a= username that is eight characters long (e.g. abcdefgh) and I check the addr= ess: >> >> sendmail -bv abcdefgh >> abcdefgh... deliverable: mailer local, user abcdefgh >> >> I can also get a deliverable message if I append other characters to the = end: >> >> sendmail -bv abcdefgh123 >> abcdefgh123... deliverable: mailer local, user abcdefgh123 >> >> Mail sent to user abcdefgh123 will create a file in /var/mail/abcdefgh123= with the permissions of user abcdefgh. Is this a known bug/problem with= Sendmail 8.8.8/8.8.8? >> >> --- >> Bob Beer >> Ohio Northern University, Academic Computer Services, Ada, OH 45810 >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe freebsd-questions" in the body of the message > >-- >WBW Andy V. Oleynik (When U work in virtual office > U have good chance to obtain virtual money =96%-) --- Bob Beer Ohio Northern University, Academic Computer Services, Ada, OH 45810 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message