All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Blomdell <anders.blomdell@control.lth.se>
To: autofs@linux.kernel.org
Subject: Automount segfaults in do_mount_indirect
Date: Tue, 20 Feb 2007 16:05:15 +0100	[thread overview]
Message-ID: <45DB0E2B.5030302@control.lth.se> (raw)

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

On Fedora Core 6 (autofs-5.0.1-0.rc3.21) I get occasional segfaults in 
do_mount_indirect, the issue seems to remain in 5.0.1 version. The attached 
patch seems to take care of the issue.

See also: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229344


-- 
Anders Blomdell                  Email: anders.blomdell@control.lth.se
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden

[-- Attachment #2: autofs-5.0.1-rc3-getXXXid_r.patch --]
[-- Type: text/plain, Size: 720 bytes --]

--- a/daemon/indirect.c	2007-02-20 14:51:08.000000000 +0100
+++ b/daemon/indirect.c	2007-02-20 14:53:32.000000000 +0100
@@ -806,8 +806,8 @@
 		goto cont;
 	}
 
-	status = getpwuid_r(mt->uid, ppw, pw_tmp, tmplen, pppw);
-	if (status) {
+	status = getpwuid_r(mt->uid, &pw, pw_tmp, tmplen, pppw);
+	if (status || !ppw) {
 		error(ap->logopt, "failed to get passwd info from getpwuid_r");
 		free(tsv);
 		free(pw_tmp);
@@ -853,8 +853,8 @@
 		goto cont;
 	}
 
-	status = getgrgid_r(mt->gid, pgr, gr_tmp, tmplen, ppgr);
-	if (status) {
+	status = getgrgid_r(mt->gid, &gr, gr_tmp, tmplen, ppgr);
+	if (status || !pgr) {
 		error(ap->logopt, "failed to get group info from getgrgid_r");
 		free(tsv->user);
 		free(tsv->home);

[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

                 reply	other threads:[~2007-02-20 15:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=45DB0E2B.5030302@control.lth.se \
    --to=anders.blomdell@control.lth.se \
    --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.