[sudo-users] Problem with Red Hat v.3 and "Memory fault" error

Todd C. Miller Todd.Miller at courtesan.com
Fri Sep 14 19:48:17 EDT 2007


In message <704385.67225.qm at web52009.mail.re2.yahoo.com>
	so spake Mike Watz (elan_mbx2):

> So I've built 1.6.9 on a Red Hat v.3 box.  Now when I execute sudo for the
> first time I get a "Memory fault" message.  After the fault I run sudo again
> and everything works fine.  So after I receive my token it apparently doesn't
> have a problem... but before I have a token it causes a "Memory fault"...
> 
> None of the other environments I've built for (RHEL4, RHEL5, Sol 8-10, HPUX
> 11i) have had this issue...

Chances are you are hitting a PAM bug in RHEL3.  A similar issue
was found with Solaris prior to Solaris 8 so it is possible that
the bug is similar.  Please try the following diff.  If that doesn't
work, running configure with the --without-pam option should give
you a working sudo.

 - todd

Index: auth/pam.c
diff -u auth/pam.c:1.43.2.4 auth/pam.c:1.43.2.5
--- auth/pam.c:1.43.2.4	Sun Jul 22 08:14:53 2007
+++ auth/pam.c	Thu Sep 13 18:42:52 2007
@@ -190,9 +190,11 @@
     /*
      * Set PAM_USER to the user we are changing *to* and
      * set PAM_RUSER to the user we are coming *from*.
+     * We set PAM_RHOST to avoid a bug in Solaris 7 and below.
      */
     (void) pam_set_item(pamh, PAM_USER, pw->pw_name);
     (void) pam_set_item(pamh, PAM_RUSER, user_name);
+    (void) pam_set_item(pamh, PAM_RHOST, user_host);
 
     /*
      * Set credentials (may include resource limits, device ownership, etc).



More information about the sudo-users mailing list