From: wengang wang <wen.gang.wang@oracle.com>
To: autofs@linux.kernel.org
Subject: SEGV when auto.master in yp-server is with a blank line at last
Date: Thu, 28 Feb 2008 10:06:27 +0800 [thread overview]
Message-ID: <47C61723.2010006@oracle.com> (raw)
Hi experts,
Recently I met a problem on RHEL5.1 with autofs-5.0.1-0.rc2.55
automount SEGV core dumps when running with configs:
/etc/auto.master
===
+auto.master
===
/etc/nsswitch.conf
===
automount: files nis
===
ypcat -k auto.master | cat -A
===
/nfs/opsutils auto.opsutils^I^I-rw,soft$
/nfs/private auto.private^I-rw,intr,nosuid$
/nfs/roview auto.roview -rw,intr,nosuid$
/nfs/group auto.group^I^I-rw,intr$
/nfs/floor auto.floor^I^I-ro,soft$
/nfs/net -hosts^I^I^I-ro,soft,nosuid$
/nfs/log auto.log-hq^I-rw,intr$
/netvobs auto.vobs^I-rw,hard,intr,nosuid$
/netview auto.view^I-rw,hard,intr,nosuid$
/home auto.home^I^I-rw,intr,nosuid$
/SCM auto.scm^I-rw,hard,intr,nosuid$
$
I found the core dump is caused by the last blank line in auto.master.
and I wrote a patch on it.
--- ./modules/lookup_yp.c.bug 2008-02-27 22:50:26.000000000 -0500
+++ ./modules/lookup_yp.c 2008-02-27 22:51:40.000000000 -0500
@@ -175,6 +175,9 @@
if (*ypkey == '+')
return 0;
+ if (ypkeylen == 0)
+ return 0;
+
*(ypkey + ypkeylen) = '\0';
*(val + vallen) = '\0';
and seems this patch fixes the problem.
Is there anything wrong with the patch?
thanks,
wengang.
next reply other threads:[~2008-02-28 2:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 2:06 wengang wang [this message]
2008-02-28 13:05 ` SEGV when auto.master in yp-server is with a blank line at last Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47C61723.2010006@oracle.com \
--to=wen.gang.wang@oracle.com \
--cc=autofs@linux.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.