https://bugs.kde.org/show_bug.cgi?id=511027

--- Comment #7 from [email protected] ---
Dunno if the kdesu programmer is on the cc list for this bug, but  I have done
a lot of poking around over the last few days and discovered what the problem
is.

The hang is due to the settings used by the DebHelper tool, used by
Ubuntu/Debian to compile their packages (possibly -DKDESU_USE_SUDO_DEFAULT).

I _think_ this causes kdesu to send different flags to sudo, which in turn
changes the authentication text string it returns, which the code does not
expect.
As a result, kdesu assumes what is being sent bu sudo is not a prompt for the
password - so it continues to wait for something that has actually been
received - causing the hang.

These are the authentication prompts received by kdesu, depending on the
compiler used:

Prompt received when compiled using make & cmake: Password:
Prompt received when compiled using debhelper: [sudo: authenticate] Password:
Prompt received by the debhelper autotests: [sudo] password for jr:

As you can see, the debhelper prompt has two colons, when it is expecting only
one (see line 268 of kdesu/src/suprocess.cpp.)
            if (colon == 1 && line[j] == ':') {

To fix it, the detection code for detecting when a password prompt has been
received needs to be amended, or the arguments sent to sudo need to be amended
so the password prompt request is consistent.

One potential fix is to skip any text in square brackets that was received  - I
have a patch which does that, that I can attach if required.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to