Bug 485380
Summary: | sendmail applies MAXHOSTNAMELEN for FQDN. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Masayoshi Yamazaki <myamazak> | ||||||
Component: | sendmail | Assignee: | Jaroslav Škarvada <jskarvad> | ||||||
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 4.7 | CC: | azelinka, jmarko, jskarvad, linux, rvokal | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | sendmail-8.13.1-4.el4 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 640232 640234 (view as bug list) | Environment: | |||||||
Last Closed: | 2011-02-16 14:36:30 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 640232, 640234 | ||||||||
Attachments: |
|
Description
Masayoshi Yamazaki
2009-02-13 07:08:47 UTC
I tried to create a patch. I've checked sources where MAXHOSTNAMELEN is used. Unfortunately, I couldn't verify some of them, enough. Anyway, I report. The following are all of parts that MAXHOSTNAMELEN is used by sendmail-8.13.1-3.3.el4. | ./include/sm/conf.h:2718:# if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) | ./include/sm/conf.h:2719:# define MAXHOSTNAMELEN 256 | ./include/sm/conf.h:2720:# endif /* !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) */ I added new macro MAXFQDNLEN in my patch. | ./sendmail/daemon.c:205: char jbuf[MAXHOSTNAMELEN]; | ./sendmail/daemon.c:287: char jbuf[MAXHOSTNAMELEN]; Above codes are deleted by cpp, because macro XDEBUG is not defined. Therefore, not include in the patch. | ./sendmail/readcf.c:942: char jbuf[MAXHOSTNAMELEN]; jbuf is used for expanded $j, then I think it needs the size of MAXFQDNLEN. | ./sendmail/sm_resolve.c:171: char host[MAXHOSTNAMELEN]; This is related to case 1) of my first report. | ./sendmail/mci.c:1207: char host[MAXHOSTNAMELEN]; | ./sendmail/mci.c:1446: char t_host[MAXHOSTNAMELEN]; These are related to MCI caching module. Without this patch, sendmail can't cache information of hosts that has long FQDN name. | ./sendmail/main.c:189: char jbuf[MAXHOSTNAMELEN]; /* holds MyHostName */ jbuf is used to store a result of gethostname(). It needs the size of MAXFQDNLEN, I think. | ./sendmail/main.c:4127: char host[MAXHOSTNAMELEN]; This is related to case 2) of my first report. | ./sendmail/map.c:1806: char buf[MAXHOSTNAMELEN]; This part is deleted by cpp, because macro NDBM is not true. Therefore, not include in the patch. | ./sendmail/map.c:3741: char jbuf[MAXHOSTNAMELEN]; It seems jbuf is used for expaned $j. | ./sendmail/conf.c:4542: char hnb[MAXHOSTNAMELEN]; This is related to 'class w', I guess it needs MAXFQNDLEN. Is this worthy? Created attachment 333141 [details]
patch for FQDN length
Thank you for report. The current implementation seems not to be against RFC as it states: ...the total length of a domain name ... is restricted to 255 octets or less... and most peoples probably don't care about this limitation. However the fix back-ported from sendmail-8.14.4 follows. Created attachment 449375 [details]
MAXHOSTNAMELEN fix
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0262.html It appears this change was only made in sendmail in RHEL 4, but the same problem affects RHEL 5 and 6. Can we please get an errata for those releases as well? Chris, it is tracked and it will be fixed in RHEL-5/6 in case of sendmail update, this bug alone is low prio. |