Bug 199329

Summary: kdesu does not work on OpenSolaris
Product: [Unmaintained] kdelibs Reporter: Moinak Ghosh <moinakg>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: groot
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch to use slave fd on OpenSolaris for tcgetattr

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)