[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdecore [POSSIBLY UNSAFE]
From: Neil Stevens <neil () qualityassistant ! com>
Date: 2003-08-15 21:18:45
[Download RAW message or body]
CVS commit by neil:
CCMAIL: cap@capsi.com
cvsrevertlast
SuSE can fight its legal battles in court, not in KDE.
M +19 -0 kpty.cpp 1.7 [POSSIBLY UNSAFE: printf]
--- kdelibs/kdecore/kpty.cpp #1.6:1.7
@@ -268,4 +268,23 @@ bool KPty::open()
#endif
+#if defined(_SCO_DS) || defined(__USLC__) // SCO OSr5 and UnixWare, might be obsolete
+ for (int idx = 0; idx < 256; idx++)
+ {
+ ptyName.sprintf("/dev/ptyp%d", idx);
+ d->ttyName.sprintf("/dev/ttyp%d", idx);
+ if (access(d->ttyName.data(), F_OK) < 0)
+ break; // no such device ...
+
+ d->masterFd = ::open(ptyName.data(), O_RDWR);
+ if (d->masterFd >= 0)
+ {
+ if (geteuid() == 0 || access (d->ttyName.data(), R_OK|W_OK) == 0)
+ goto gotpty;
+ ::close(d->masterFd);
+ d->masterFd = -1;
+ }
+ }
+#endif
+
// Linux device names, FIXME: Trouble on other systems?
for (const char* s3 = "pqrstuvwxyzabcdefghijklmno"; *s3 != 0; s3++)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic