Bug 146521 - ypserv Makefile does not parse /etc/aliases properly
ypserv Makefile does not parse /etc/aliases properly
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: ypserv (Show other bugs)
3.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
Jay Turner
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2005-05-19 19:34:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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

  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):
ypserv-2.8-11

How reproducible:
Always

Steps to Reproduce:
1. Edit your YP aliases file, add the entries:
alias-nospaces:root
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
root
ypmatch alias-spaces aliases
Can't match key alias-spaces in map mail.aliases. Reason: No such key in map
ypmatch "alias-spaces " aliases
root

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

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:
NOPUSH=false
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.

http://rhn.redhat.com/errata/RHBA-2005-352.html

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