summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2002-01-21 04:26:32 +0000
committerWill Andrews <will@FreeBSD.org>2002-01-21 04:26:32 +0000
commit56067c5970794bf416c04b70c1cbc3c3e8c29278 (patch)
treebbcc9982377031b332ad43fb80033dbaf869c2ac /x11
parentA gnome user confirms that the new hooks in xscreensaver work, so (diff)
Bring in a -real- fix for kdesu. Many thanks to Alan Eldridge and
Waldo Bastian for their work towards fixing this both in 2.2.2/ports and KDE3 CVS. Bump PORTREVISION to make sure people get *this* fix and not the previous broken one. PR: 32549 (for real this time) Submitted by: Alan Eldridge <alane@geeksrus.net>, Waldo Bastian <bastian@kde.org>
Notes
Notes: svn path=/head/; revision=53433
Diffstat (limited to 'x11')
-rw-r--r--x11/kdelibs2/Makefile2
-rw-r--r--x11/kdelibs2/files/patch-kdesu::kdesu_pty.cpp18
-rw-r--r--x11/kdelibs2/files/patch-kdesu::process.cpp39
-rw-r--r--x11/kdelibs2/files/patch-su.cpp25
-rw-r--r--x11/kdelibs3/Makefile2
-rw-r--r--x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp18
-rw-r--r--x11/kdelibs3/files/patch-kdesu::process.cpp39
-rw-r--r--x11/kdelibs4/Makefile2
-rw-r--r--x11/kdelibs4/files/patch-kdesu::kdesu_pty.cpp18
-rw-r--r--x11/kdelibs4/files/patch-kdesu::process.cpp39
10 files changed, 174 insertions, 28 deletions
diff --git a/x11/kdelibs2/Makefile b/x11/kdelibs2/Makefile
index 51a2c7d8f2be..48a1f7455feb 100644
--- a/x11/kdelibs2/Makefile
+++ b/x11/kdelibs2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= kdelibs
PORTVERSION= 2.2.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdelibs2/files/patch-kdesu::kdesu_pty.cpp b/x11/kdelibs2/files/patch-kdesu::kdesu_pty.cpp
new file mode 100644
index 000000000000..74be807e3786
--- /dev/null
+++ b/x11/kdelibs2/files/patch-kdesu::kdesu_pty.cpp
@@ -0,0 +1,18 @@
+--- kdesu/kdesu_pty.cpp.orig Wed Apr 11 12:48:56 2001
++++ kdesu/kdesu_pty.cpp Thu Jan 10 18:35:17 2002
+@@ -101,13 +101,13 @@
+ #elif defined(HAVE_OPENPTY)
+ // 2: BSD interface
+ // More prefered than the linux hacks
+- char name[10];
++ char name[30];
+ int master_fd, slave_fd;
+ if (openpty(&master_fd, &slave_fd, name, 0L, 0L) != -1) {
+ ttyname = name;
+ name[5]='p';
+ ptyname = name;
+- //close(slave_fd); // We don't need this yet // Yes, we do.
++ close(slave_fd); // We don't need this yet // Yes, we do.
+ ptyfd = master_fd;
+ return ptyfd;
+ }
diff --git a/x11/kdelibs2/files/patch-kdesu::process.cpp b/x11/kdelibs2/files/patch-kdesu::process.cpp
new file mode 100644
index 000000000000..610789408085
--- /dev/null
+++ b/x11/kdelibs2/files/patch-kdesu::process.cpp
@@ -0,0 +1,39 @@
+--- kdesu/process.cpp.orig Sat Feb 17 21:03:18 2001
++++ kdesu/process.cpp Fri Jan 11 21:23:41 2002
+@@ -120,13 +120,16 @@
+ kdError(900) << k_lineinfo << "fcntl(F_GETFL): " << perror << "\n";
+ return ret;
+ }
++ int oflags = flags;
+ if (block)
+ flags &= ~O_NONBLOCK;
+ else
+ flags |= O_NONBLOCK;
+- if (fcntl(m_Fd, F_SETFL, flags) < 0)
++
++ if ((flags != oflags) && (fcntl(m_Fd, F_SETFL, flags) < 0))
+ {
+- kdError(900) << k_lineinfo << "fcntl(F_SETFL): " << perror << "\n";
++ // We get an error here when the child process has closed
++ // the file descriptor already.
+ return ret;
+ }
+
+@@ -231,12 +234,12 @@
+ path = QFile::encodeName(file);
+ }
+
+- int i;
+- const char * argp[32];
+- argp[0] = path;
+- QCStringList::Iterator it;
+- for (i=1, it=args.begin(); it!=args.end() && i<31; it++)
++ const char **argp = (const char **)malloc((args.count()+2)*sizeof(char *));
++ int i = 0;
++ argp[i++] = path;
++ for (QCStringList::ConstIterator it=args.begin(); it!=args.end(); it++)
+ argp[i++] = *it;
++
+ argp[i] = 0L;
+
+ execv(path, (char * const *)argp);
diff --git a/x11/kdelibs2/files/patch-su.cpp b/x11/kdelibs2/files/patch-su.cpp
deleted file mode 100644
index 1993ba8dd6b2..000000000000
--- a/x11/kdelibs2/files/patch-su.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
---- kdesu/su.cpp Sun Jan 6 20:22:55 2002
-+++ kdesu/su.cpp.new Sun Jan 6 20:22:48 2002
-@@ -74,6 +74,7 @@
- setTerminal(true);
-
- QCStringList args;
-+ args+="-m";
- if ((m_Scheduler != SchedNormal) || (m_Priority > 50))
- args += "root";
- else
-@@ -185,12 +186,12 @@
- break;
-
- case 1:
-- if (line.stripWhiteSpace().isEmpty())
-+ QCString s=line.stripWhiteSpace();
-+ if (s.isEmpty())
- {
- state++;
- break;
- }
-- QCString s=line.stripWhiteSpace();
- for (i=0; i<s.length(); i++)
- {
- if (s[i] != '*')
diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile
index 51a2c7d8f2be..48a1f7455feb 100644
--- a/x11/kdelibs3/Makefile
+++ b/x11/kdelibs3/Makefile
@@ -7,7 +7,7 @@
PORTNAME= kdelibs
PORTVERSION= 2.2.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp b/x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp
new file mode 100644
index 000000000000..74be807e3786
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp
@@ -0,0 +1,18 @@
+--- kdesu/kdesu_pty.cpp.orig Wed Apr 11 12:48:56 2001
++++ kdesu/kdesu_pty.cpp Thu Jan 10 18:35:17 2002
+@@ -101,13 +101,13 @@
+ #elif defined(HAVE_OPENPTY)
+ // 2: BSD interface
+ // More prefered than the linux hacks
+- char name[10];
++ char name[30];
+ int master_fd, slave_fd;
+ if (openpty(&master_fd, &slave_fd, name, 0L, 0L) != -1) {
+ ttyname = name;
+ name[5]='p';
+ ptyname = name;
+- //close(slave_fd); // We don't need this yet // Yes, we do.
++ close(slave_fd); // We don't need this yet // Yes, we do.
+ ptyfd = master_fd;
+ return ptyfd;
+ }
diff --git a/x11/kdelibs3/files/patch-kdesu::process.cpp b/x11/kdelibs3/files/patch-kdesu::process.cpp
new file mode 100644
index 000000000000..610789408085
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kdesu::process.cpp
@@ -0,0 +1,39 @@
+--- kdesu/process.cpp.orig Sat Feb 17 21:03:18 2001
++++ kdesu/process.cpp Fri Jan 11 21:23:41 2002
+@@ -120,13 +120,16 @@
+ kdError(900) << k_lineinfo << "fcntl(F_GETFL): " << perror << "\n";
+ return ret;
+ }
++ int oflags = flags;
+ if (block)
+ flags &= ~O_NONBLOCK;
+ else
+ flags |= O_NONBLOCK;
+- if (fcntl(m_Fd, F_SETFL, flags) < 0)
++
++ if ((flags != oflags) && (fcntl(m_Fd, F_SETFL, flags) < 0))
+ {
+- kdError(900) << k_lineinfo << "fcntl(F_SETFL): " << perror << "\n";
++ // We get an error here when the child process has closed
++ // the file descriptor already.
+ return ret;
+ }
+
+@@ -231,12 +234,12 @@
+ path = QFile::encodeName(file);
+ }
+
+- int i;
+- const char * argp[32];
+- argp[0] = path;
+- QCStringList::Iterator it;
+- for (i=1, it=args.begin(); it!=args.end() && i<31; it++)
++ const char **argp = (const char **)malloc((args.count()+2)*sizeof(char *));
++ int i = 0;
++ argp[i++] = path;
++ for (QCStringList::ConstIterator it=args.begin(); it!=args.end(); it++)
+ argp[i++] = *it;
++
+ argp[i] = 0L;
+
+ execv(path, (char * const *)argp);
diff --git a/x11/kdelibs4/Makefile b/x11/kdelibs4/Makefile
index 51a2c7d8f2be..48a1f7455feb 100644
--- a/x11/kdelibs4/Makefile
+++ b/x11/kdelibs4/Makefile
@@ -7,7 +7,7 @@
PORTNAME= kdelibs
PORTVERSION= 2.2.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdelibs4/files/patch-kdesu::kdesu_pty.cpp b/x11/kdelibs4/files/patch-kdesu::kdesu_pty.cpp
new file mode 100644
index 000000000000..74be807e3786
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdesu::kdesu_pty.cpp
@@ -0,0 +1,18 @@
+--- kdesu/kdesu_pty.cpp.orig Wed Apr 11 12:48:56 2001
++++ kdesu/kdesu_pty.cpp Thu Jan 10 18:35:17 2002
+@@ -101,13 +101,13 @@
+ #elif defined(HAVE_OPENPTY)
+ // 2: BSD interface
+ // More prefered than the linux hacks
+- char name[10];
++ char name[30];
+ int master_fd, slave_fd;
+ if (openpty(&master_fd, &slave_fd, name, 0L, 0L) != -1) {
+ ttyname = name;
+ name[5]='p';
+ ptyname = name;
+- //close(slave_fd); // We don't need this yet // Yes, we do.
++ close(slave_fd); // We don't need this yet // Yes, we do.
+ ptyfd = master_fd;
+ return ptyfd;
+ }
diff --git a/x11/kdelibs4/files/patch-kdesu::process.cpp b/x11/kdelibs4/files/patch-kdesu::process.cpp
new file mode 100644
index 000000000000..610789408085
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdesu::process.cpp
@@ -0,0 +1,39 @@
+--- kdesu/process.cpp.orig Sat Feb 17 21:03:18 2001
++++ kdesu/process.cpp Fri Jan 11 21:23:41 2002
+@@ -120,13 +120,16 @@
+ kdError(900) << k_lineinfo << "fcntl(F_GETFL): " << perror << "\n";
+ return ret;
+ }
++ int oflags = flags;
+ if (block)
+ flags &= ~O_NONBLOCK;
+ else
+ flags |= O_NONBLOCK;
+- if (fcntl(m_Fd, F_SETFL, flags) < 0)
++
++ if ((flags != oflags) && (fcntl(m_Fd, F_SETFL, flags) < 0))
+ {
+- kdError(900) << k_lineinfo << "fcntl(F_SETFL): " << perror << "\n";
++ // We get an error here when the child process has closed
++ // the file descriptor already.
+ return ret;
+ }
+
+@@ -231,12 +234,12 @@
+ path = QFile::encodeName(file);
+ }
+
+- int i;
+- const char * argp[32];
+- argp[0] = path;
+- QCStringList::Iterator it;
+- for (i=1, it=args.begin(); it!=args.end() && i<31; it++)
++ const char **argp = (const char **)malloc((args.count()+2)*sizeof(char *));
++ int i = 0;
++ argp[i++] = path;
++ for (QCStringList::ConstIterator it=args.begin(); it!=args.end(); it++)
+ argp[i++] = *it;
++
+ argp[i] = 0L;
+
+ execv(path, (char * const *)argp);