Date: Wed, 10 May 2006 08:20:19 GMT From: Dejan Lesjak <dejan.lesjak@ijs.si> To: freebsd-x11@FreeBSD.org Subject: Re: ports/96436: [patch] x11/xorg-clients: logging on xdm with pam_krb does not create a ticket file Message-ID: <200605100820.k4A8KJn3016814@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/96436; it has been noted by GNATS. From: Dejan Lesjak <dejan.lesjak@ijs.si> To: bug-followup@freebsd.org, bsam@ipt.ru Cc: Subject: Re: ports/96436: [patch] x11/xorg-clients: logging on xdm with pam_krb does not create a ticket file Date: Wed, 10 May 2006 10:16:11 +0200 --Boundary-00=_LFaYE6C/0mcA8iA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline This would seem to be bug #4765 in X.org bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=4765 Could you try if the attached patch from there taken from X.org CVS works for you? --Boundary-00=_LFaYE6C/0mcA8iA Content-Type: text/x-diff; charset="us-ascii"; name="xo-clients-xdmpam.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xo-clients-xdmpam.patch" Index: Makefile =================================================================== RCS file: /usr/local/repos/freebsd/ports/x11/xorg-clients/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- Makefile 9 May 2006 15:53:39 -0000 1.24 +++ Makefile 10 May 2006 08:09:35 -0000 @@ -7,7 +7,7 @@ PORTNAME= xorg-clients PORTVERSION= 6.9.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XORG} MASTER_SITE_SUBDIR= X11R${PORTVERSION}/src Index: files/patch-xdm_session.c =================================================================== RCS file: /usr/local/repos/freebsd/ports/x11/xorg-clients/files/patch-xdm_session.c,v retrieving revision 1.2 diff -u -r1.2 patch-xdm_session.c --- files/patch-xdm_session.c 17 Jun 2004 01:53:09 -0000 1.2 +++ files/patch-xdm_session.c 10 May 2006 08:04:17 -0000 @@ -1,5 +1,5 @@ ---- programs/xdm/session.c.orig Thu Mar 4 09:48:55 2004 -+++ programs/xdm/session.c Wed Jun 16 16:59:46 2004 +--- programs/xdm/session.c.orig Wed May 10 10:01:21 2006 ++++ programs/xdm/session.c Wed May 10 10:01:09 2006 @@ -55,7 +55,6 @@ #ifdef SECURE_RPC # include <rpc/rpc.h> @@ -8,7 +8,7 @@ #endif #ifdef K5AUTH # include <krb5/krb5.h> -@@ -529,6 +528,7 @@ +@@ -533,6 +532,7 @@ int pid; #ifdef HAS_SETUSERCONTEXT struct passwd* pwd; @@ -16,7 +16,48 @@ #endif #ifdef USE_PAM pam_handle_t *pamh = thepamh (); -@@ -610,6 +610,8 @@ +@@ -568,17 +568,6 @@ + + /* Do system-dependent login setup here */ + +-#ifdef USE_PAM +- /* pass in environment variables set by libpam and modules it called */ +- if (pamh) { +- long i; +- char **pam_env = pam_getenvlist(pamh); +- for(i = 0; pam_env && pam_env[i]; i++) { +- verify->userEnviron = putEnv(pam_env[i], verify->userEnviron); +- } +- } +-#endif +- + #ifdef USESECUREWARE + Debug ("set_identity: uid=%d\n", userp->pw.pw_uid); + ret = smp_set_identity (userp, &reason, &smpenv, &smpshell); +@@ -630,12 +619,22 @@ + #endif /* QNX4 doesn't support multi-groups, no initgroups() */ + #ifdef USE_PAM + if (pamh) { ++ long i; ++ char **pam_env; ++ + pam_error = pam_setcred (pamh, PAM_ESTABLISH_CRED); + if (pam_error != PAM_SUCCESS) { + LogError ("pam_setcred for \"%s\" failed: %s\n", + name, pam_strerror(pamh, pam_error)); + return(0); + } ++ ++ /* pass in environment variables set by libpam and modules it called */ ++ pam_env = pam_getenvlist(pamh); ++ for(i = 0; pam_env && pam_env[i]; i++) { ++ verify->userEnviron = putEnv(pam_env[i], verify->userEnviron); ++ } ++ + } + #endif + if (setuid(verify->uid) < 0) { +@@ -648,6 +647,8 @@ * Set the user's credentials: uid, gid, groups, * environment variables, resource limits, and umask. */ @@ -25,7 +66,7 @@ pwd = getpwnam(name); if (pwd) { if (setusercontext(NULL, pwd, pwd->pw_uid, LOGIN_SETALL) < 0) { -@@ -617,6 +619,7 @@ +@@ -655,6 +656,7 @@ errno); return (0); } --Boundary-00=_LFaYE6C/0mcA8iA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605100820.k4A8KJn3016814>