diff options
author | Michael Nottebrock <lofi@FreeBSD.org> | 2004-08-12 21:28:53 +0000 |
---|---|---|
committer | Michael Nottebrock <lofi@FreeBSD.org> | 2004-08-12 21:28:53 +0000 |
commit | a4d6c1c4b5460f32259e7f893068d22a7ab7fcfa (patch) | |
tree | 334eff1071584cd785374d2a4e8b1ddc4c5dd727 /x11 | |
parent | 3f9cf344ae32ef36b15eebba176de00a93e69b65 (diff) | |
download | ports-a4d6c1c4b5460f32259e7f893068d22a7ab7fcfa.tar.gz ports-a4d6c1c4b5460f32259e7f893068d22a7ab7fcfa.zip |
Notes
Diffstat (limited to 'x11')
-rw-r--r-- | x11/kdelibs3/Makefile | 2 | ||||
-rw-r--r-- | x11/kdelibs3/files/patch-kdecore_kstandarddirs.cpp | 38 | ||||
-rw-r--r-- | x11/kdelibs4/Makefile | 2 | ||||
-rw-r--r-- | x11/kdelibs4/files/patch-kdecore_kstandarddirs.cpp | 38 |
4 files changed, 78 insertions, 2 deletions
diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile index 6f5816b1bef5..3ec71f896601 100644 --- a/x11/kdelibs3/Makefile +++ b/x11/kdelibs3/Makefile @@ -8,7 +8,7 @@ PORTNAME= kdelibs PORTVERSION= ${KDE_VERSION} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11 kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src diff --git a/x11/kdelibs3/files/patch-kdecore_kstandarddirs.cpp b/x11/kdelibs3/files/patch-kdecore_kstandarddirs.cpp new file mode 100644 index 000000000000..30d6bd10edbe --- /dev/null +++ b/x11/kdelibs3/files/patch-kdecore_kstandarddirs.cpp @@ -0,0 +1,38 @@ +Index: kstandarddirs.cpp +=================================================================== +RCS file: /home/kde/kdelibs/kdecore/kstandarddirs.cpp,v +retrieving revision 1.168.2.3 +retrieving revision 1.168.2.4 +diff -u -p -r1.168.2.3 -r1.168.2.4 +--- kdecore/kstandarddirs.cpp 8 Jun 2004 09:27:57 -0000 1.168.2.3 ++++ kdecore/kstandarddirs.cpp 26 Jun 2004 14:42:16 -0000 1.168.2.4 +@@ -651,7 +651,28 @@ void KStandardDirs::createSpecialResourc + char link[1024]; + link[1023] = 0; + int result = readlink(QFile::encodeName(dir).data(), link, 1023); +- if ((result == -1) && (errno == ENOENT)) ++ bool relink = (result == -1) && (errno == ENOENT); ++ if ((result > 0) && (link[0] == '/')) ++ { ++ link[result] = 0; ++ struct stat stat_buf; ++ int res = lstat(link, &stat_buf); ++ if ((res == -1) && (errno == ENOENT)) ++ { ++ relink = true; ++ } ++ else if ((res == -1) || (!S_ISDIR(stat_buf.st_mode))) ++ { ++ fprintf(stderr, "Error: \"%s\" is not a directory.\n", link); ++ relink = true; ++ } ++ else if (stat_buf.st_uid != getuid()) ++ { ++ fprintf(stderr, "Error: \"%s\" is owned by uid %d instead of uid %d.\n", link, stat_buf.st_uid, getuid()); ++ relink = true; ++ } ++ } ++ if (relink) + { + QString srv = findExe(QString::fromLatin1("lnusertemp"), KDEDIR+QString::fromLatin1("/bin")); + if (srv.isEmpty()) diff --git a/x11/kdelibs4/Makefile b/x11/kdelibs4/Makefile index 6f5816b1bef5..3ec71f896601 100644 --- a/x11/kdelibs4/Makefile +++ b/x11/kdelibs4/Makefile @@ -8,7 +8,7 @@ PORTNAME= kdelibs PORTVERSION= ${KDE_VERSION} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11 kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src diff --git a/x11/kdelibs4/files/patch-kdecore_kstandarddirs.cpp b/x11/kdelibs4/files/patch-kdecore_kstandarddirs.cpp new file mode 100644 index 000000000000..30d6bd10edbe --- /dev/null +++ b/x11/kdelibs4/files/patch-kdecore_kstandarddirs.cpp @@ -0,0 +1,38 @@ +Index: kstandarddirs.cpp +=================================================================== +RCS file: /home/kde/kdelibs/kdecore/kstandarddirs.cpp,v +retrieving revision 1.168.2.3 +retrieving revision 1.168.2.4 +diff -u -p -r1.168.2.3 -r1.168.2.4 +--- kdecore/kstandarddirs.cpp 8 Jun 2004 09:27:57 -0000 1.168.2.3 ++++ kdecore/kstandarddirs.cpp 26 Jun 2004 14:42:16 -0000 1.168.2.4 +@@ -651,7 +651,28 @@ void KStandardDirs::createSpecialResourc + char link[1024]; + link[1023] = 0; + int result = readlink(QFile::encodeName(dir).data(), link, 1023); +- if ((result == -1) && (errno == ENOENT)) ++ bool relink = (result == -1) && (errno == ENOENT); ++ if ((result > 0) && (link[0] == '/')) ++ { ++ link[result] = 0; ++ struct stat stat_buf; ++ int res = lstat(link, &stat_buf); ++ if ((res == -1) && (errno == ENOENT)) ++ { ++ relink = true; ++ } ++ else if ((res == -1) || (!S_ISDIR(stat_buf.st_mode))) ++ { ++ fprintf(stderr, "Error: \"%s\" is not a directory.\n", link); ++ relink = true; ++ } ++ else if (stat_buf.st_uid != getuid()) ++ { ++ fprintf(stderr, "Error: \"%s\" is owned by uid %d instead of uid %d.\n", link, stat_buf.st_uid, getuid()); ++ relink = true; ++ } ++ } ++ if (relink) + { + QString srv = findExe(QString::fromLatin1("lnusertemp"), KDEDIR+QString::fromLatin1("/bin")); + if (srv.isEmpty()) |