d1c2f0dddd
original versions of these ports, so some PORTREVISIONs were bumped. See http://freebsd.kde.org/ and mailing lists linked to from there for info on the packages generated to test these ports. bsd.kde.mk has already been updated a few days ago to work with these. Some patches applied to fix a few bugs were: deskutils/kdepim3: [1] Remove kpilot from build because it wasn't ready at release. editors/koffice-kde3: [2] Fix compile time bugs for FreeBSD. misc/kdeedu3: [3] Fix compile problem with kvoctrain. x11/kdebase3: [4] Fix KDM CPU usage and login bug. Some caveats: * All PLISTs are broken for deinstall due to script bug that I didn't notice until very recently. This will be fixed when I commit an update tomorrow. These ports should still install perfectly fine though. They should also deinstall without giving errors, but will leave directories behind. * You can't install this with any other version of QT or KDE already installed. I am not sure the checks are 100% working, but fixes for these will be forthcoming. This is mainly due to a policy decision made by kde@ to make QT/KDE ports install the way the rest of the world expects it to while also still conforming to FreeBSD's hier(7). For reference on this decision, please consult the KDE/FreeBSD mailing list archives. This decision fixes 2-year-old bug reports relating to how we handled this for KDE2 vs KDE1. Submitted by: [1] Adrian de Groot <adridg@cs.kun.nl>, [2] David Faure <faure@kde.org>, Andy Fawcett <andy@athame.co.uk> Lauri Watts <lauri@kde.org> [3] Lauri Watts <lauri@kde.org> [4] Alan Eldridge <alane@geeksrus.net> Oswald Buddenhagen <ossi@kde.org> Reviewed by: kde
79 lines
1.9 KiB
C
79 lines
1.9 KiB
C
--- ./kdm/backend/client.c.orig Sun Mar 24 12:31:09 2002
|
|
+++ ./kdm/backend/client.c Thu Apr 18 20:53:44 2002
|
|
@@ -52,6 +52,12 @@
|
|
#ifdef K5AUTH
|
|
# include <krb5/krb5.h>
|
|
#endif
|
|
+#ifdef CSRG_BASED
|
|
+# ifdef HAS_SETUSERCONTEXT
|
|
+# include <login_cap.h>
|
|
+# define USE_LOGIN_CAP 1
|
|
+# endif
|
|
+#endif
|
|
#ifdef USE_PAM
|
|
# include <security/pam_appl.h>
|
|
#elif defined(AIXV3) /* USE_PAM */
|
|
@@ -71,13 +77,6 @@
|
|
# include <kafs.h>
|
|
# endif
|
|
# endif
|
|
-# ifdef CSRG_BASED
|
|
-# include <sys/param.h>
|
|
-# ifdef HAS_SETUSERCONTEXT
|
|
-# include <login_cap.h>
|
|
-# define USE_LOGIN_CAP 1
|
|
-# endif
|
|
-# endif
|
|
/* for nologin */
|
|
# include <sys/types.h>
|
|
# include <unistd.h>
|
|
@@ -867,12 +866,11 @@
|
|
char *msg;
|
|
char **theenv;
|
|
extern char **newenv; /* from libs.a, this is set up by setpenv */
|
|
-# else
|
|
-# ifdef HAS_SETUSERCONTEXT
|
|
- extern char **environ;
|
|
-# endif
|
|
# endif
|
|
#endif
|
|
+#ifdef HAS_SETUSERCONTEXT
|
|
+ extern char **environ;
|
|
+#endif
|
|
char *failsafeArgv[2];
|
|
struct verify_info *verify;
|
|
int i, pid;
|
|
@@ -1004,10 +1002,11 @@
|
|
|
|
#ifndef AIXV3
|
|
|
|
-# if !defined(HAS_SETUSERCONTEXT) || defined(USE_PAM)
|
|
+# ifndef HAS_SETUSERCONTEXT
|
|
if (!SetGid (name, verify->gid))
|
|
exit (1);
|
|
-# ifdef USE_PAM
|
|
+# endif
|
|
+# ifdef USE_PAM
|
|
pam_setcred(pamh, 0);
|
|
/* pass in environment variables set by libpam and modules it called */
|
|
pam_env = pam_getenvlist(pamh);
|
|
@@ -1015,7 +1014,8 @@
|
|
if (pam_env)
|
|
for(; *pam_env; pam_env++)
|
|
verify->userEnviron = putEnv(*pam_env, verify->userEnviron);
|
|
-# endif
|
|
+# endif
|
|
+# ifndef HAS_SETUSERCONTEXT
|
|
# if defined(BSD) && (BSD >= 199103)
|
|
if (setlogin(name) < 0)
|
|
{
|
|
@@ -1025,7 +1025,8 @@
|
|
# endif
|
|
if (!SetUid (name, verify->uid))
|
|
exit (1);
|
|
-# else /* HAS_SETUSERCONTEXT && !USE_PAM */
|
|
+# else /* HAS_SETUSERCONTEXT */
|
|
+
|
|
/*
|
|
* Destroy environment unless user has requested its preservation.
|
|
* We need to do this before setusercontext() because that may
|