Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 146521 - ypserv Makefile does not parse /etc/aliases properly
ypserv Makefile does not parse /etc/aliases properly
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ypserv (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
Jay Turner
Depends On:
  Show dependency treegraph
Reported: 2005-01-28 18:43 EST by Greg Retkowski
Modified: 2015-01-07 19:09 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-19 19:34:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output of 'ypcat -k aliases' (1.06 KB, text/plain)
2005-02-01 16:52 EST, Greg Retkowski
no flags Details
Contents of /etc/aliases file (1.66 KB, text/plain)
2005-02-01 17:07 EST, Greg Retkowski
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:352 normal SHIPPED_LIVE ypserv bug fix update 2005-05-19 00:00:00 EDT

  None (edit)
Description Greg Retkowski 2005-01-28 18:43:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Description of problem:
When building the aliases database for ypserv, makedbm or the makefile does not properly handle whitespace following 'aliasname:'. If there is whitespace after the colon the ypmap key will be "aliasname " (the alias followed by one space).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Edit your YP aliases file, add the entries:
alias-spaces:   root
2. Rebuild your yp maps (cd /var/yp;make)
3. Execute the following ypmatch commands:
ypmatch alias-nospaces aliases
ypmatch alias-spaces aliases
ypmatch "alias-spaces " aliases

Actual Results:  Results for each command:
ypmatch alias-nospaces aliases
ypmatch alias-spaces aliases
Can't match key alias-spaces in map mail.aliases. Reason: No such key in map
ypmatch "alias-spaces " aliases

Expected Results:  ypmatch alias-nospaces aliases
ypmatch alias-spaces aliases

Additional info:

The following sed command can be put in a pipe between the awk and makedbm commands for the mail.aliases rule in the Makefile to strip the whitespace:

sed -e 's/:[ \t]*/:/'
Comment 2 Chris Feist 2005-02-01 15:28:02 EST
I was unable to replicate the problem with my machines.

Could you please post the output of the 'ypcat -k aliases' command.
Comment 3 Greg Retkowski 2005-02-01 16:52:59 EST
Created attachment 110530 [details]
Output of 'ypcat -k aliases'

Attached is the requested output of 'ypcat -k aliases'.
Additional notes on the environment; because we are using slave
servers, these changes were made to the master's yp Makefile:
DOMAIN =`/bin/domainname`

And for build target 'all', the following subtargets were included:
netgrp auto.master auto.home auto.local

Other then that the makefile is stock. (verified via diff).
Comment 4 Chris Feist 2005-02-01 16:59:04 EST
Can you also attach your /etc/aliases file.
Comment 5 Greg Retkowski 2005-02-01 17:07:50 EST
Created attachment 110533 [details]
Contents of /etc/aliases file

Stock except for the last 5 lines.
Comment 6 Chris Feist 2005-02-02 18:36:37 EST
This has been fixed in ypserv-2.8-12 on RHEL-3.
Comment 7 Tim Powers 2005-05-19 19:34:55 EDT
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 the 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.


Note You need to log in before you can comment on or make changes to this bug.