Date: Fri, 30 Apr 1999 13:11:16 -0400 From: Robert Beer <r-beer@onu.edu> To: freebsd-questions@freebsd.org Cc: "Andy V. Oleynik" <andyo@prime.net.ua> Subject: Re: Sendmail and Eight Character Username Strangeness Message-ID: <l031303a4b34f91858bbe@[140.228.15.35]> In-Reply-To: <37298025.35D8AA73@prime.net.ua> References: <l03130385b34e3a1cd910@[140.228.15.35]>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <r-beer@onu.edu> >> 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 <r-beer@onu.edu> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?l031303a4b34f91858bbe>