Bug 199329 - kdesu does not work on OpenSolaris
Summary: kdesu does not work on OpenSolaris
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-07 20:00 UTC by Moinak Ghosh
Modified: 2021-07-12 11:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch to use slave fd on OpenSolaris for tcgetattr (1.42 KB, patch)
2009-07-07 20:01 UTC, Moinak Ghosh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moinak Ghosh 2009-07-07 20:00:40 UTC
Version:            (using KDE 4.2.4)
Compiler:          Gcc 4.4 
OS:                Solaris
Installed from:    Compiled From Sources

kdesu in KDE 4.2.4 fails in OpenSolaris with a message saying conversation with su failed. It turns out that KPty calls tcgetattr on the master fd which fails on OpenSolaris.
The attached patch adds a check for Solaris and uses the slave fd if so. When I checked KDE 3 source I found that this handling was done properly in KDE 3 but got changed during subsequent code refactoring in 4.x.
Comment 1 Moinak Ghosh 2009-07-07 20:01:48 UTC
Created attachment 35132 [details]
Patch to use slave fd on OpenSolaris for tcgetattr
Comment 2 Oswald Buddenhagen 2010-11-06 22:56:34 UTC
whoops - FAIL. :}

the patch is not goood, because it is not behavior, binary or even source compatible.
you need to open the slave only temporarily if it's not open yet. and hope that the additional EOFs make no socket notifiers go haywire.

for kde5, the behavior of the api should be probably modified to require an open slave.
Comment 3 Oswald Buddenhagen 2010-11-13 19:06:49 UTC
see also http://websvn.kde.org/?view=revision&revision=1195111
Comment 4 groot 2021-07-12 11:04:30 UTC
(Solaris is no longer supported, even if this might be reasonably tested on Illumos; if there's a current-generation issue, let's file it separately)