[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ecryptfs-devel
Subject:    [Ecryptfs-devel] [PATCH] pam_ecryptfs: waitpid()
From:       Dustin Kirkland <kirkland () canonical ! com>
Date:       2008-07-21 21:25:11
Message-ID: 1216675511.7284.3.camel () t61p ! dustinkirkland ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


[PATCH] pam_ecryptfs: waitpid()

I'm experiencing some strange hangs in various Xwindows desktop managers
(Gnome, KDE, XFCE), related to the pam_ecryptfs module.  It seems to be
related to this wait() call.  All issues I'm experiencing are fixed by
this one-line patch, using waitpid() instead.

waitpid() seems to be used elsewhere in pam_ecryptfs, so I think this
should be preferred, for consistency.


-- 
:-Dustin

Dustin Kirkland
Ubuntu Server Developer
Canonical, LTD
kirkland@canonical.com
GPG: 1024D/83A61194


diff --git a/src/pam_ecryptfs/pam_ecryptfs.c b/src/pam_ecryptfs/pam_ecryptfs.c
index a284989..40c4022 100644
--- a/src/pam_ecryptfs/pam_ecryptfs.c
+++ b/src/pam_ecryptfs/pam_ecryptfs.c
@@ -256,7 +256,7 @@ static int private_dir(pam_handle_t *pamh, int mount)
 		}
 		return 1;
 	} else {
-		wait(&rc);
+		waitpid(pid, &rc, NULL);
 		syslog(LOG_INFO, 
 		       "Mount of private directory return code [%d]", rc);
 		goto out;


["pam_ecryptfs.waitpid.patch" (pam_ecryptfs.waitpid.patch)]

diff --git a/src/pam_ecryptfs/pam_ecryptfs.c b/src/pam_ecryptfs/pam_ecryptfs.c
index a284989..40c4022 100644
--- a/src/pam_ecryptfs/pam_ecryptfs.c
+++ b/src/pam_ecryptfs/pam_ecryptfs.c
@@ -256,7 +256,7 @@ static int private_dir(pam_handle_t *pamh, int mount)
 		}
 		return 1;
 	} else {
-		wait(&rc);
+		waitpid(pid, &rc, NULL);
 		syslog(LOG_INFO, 
 		       "Mount of private directory return code [%d]", rc);
 		goto out;

["signature.asc" (application/pgp-signature)]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
eCryptfs-devel mailing list
eCryptfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecryptfs-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic