LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Gksu error Slackw14.1 and Mate 1.6 (https://www.linuxquestions.org/questions/slackware-14/gksu-error-slackw14-1-and-mate-1-6-a-4175486570/)

aszabo 12-02-2013 11:41 AM

Gksu error Slackw14.1 and Mate 1.6
 
Hi,

I have installed Slackware 14.1 and Mate 1.6 from mateslackbuilds. Everything works very well so far, except for gksu.
When I run "gksu /usr/sbin/gparted", I get the following error:

Failed to run /usr/sbin/gparted as user root.

Failed to communicate with gksu-run-helper

What can the problem be?

Thanks for the help in advance.

willysr 12-02-2013 12:21 PM

You are right
this is a confirmed bug

Thanks for reporting..

aszabo 12-02-2013 12:53 PM

Not at all. Since I have used Mate on Slackware intensive, every day for more than one year (first Salix and now your packages), I will send you my report of accidental bugs if any occurs.

When could we get its correction?

willysr 12-02-2013 01:32 PM

OK, libgksu has been updated in our repository and git as well
please get the latest libgksu and upgrade to that version

it should fix this problem

aszabo 12-02-2013 03:06 PM

I have upgraded with the new version, but the problem still persists.

willysr 12-02-2013 06:37 PM

My fault.... i didn't properly checked the symlink created

Building a new version now

willysr 12-02-2013 08:17 PM

And it's uploaded now

aszabo 12-03-2013 12:24 AM

Upraded, but neither gksu nor gksudo does work. The problem still existst.

willysr 12-03-2013 02:48 AM

What's your architecture? 32/64 bit?
If you are using 64 bit, can you show the output of
Code:

ls -al /usr/lib/libgksu/

willysr 12-03-2013 03:32 AM

I tested with gksu /usr/sbin/parted since i don't have gparted on my system and it asked for root password here

willysr 12-03-2013 05:10 AM

I think this is a bug which can't be fixed as there's no more development upstream.
I searched for other distributions and they don't plan to fix this either

kikinovak 12-03-2013 05:23 AM

Workaround in the meantime.
  • Open MATE Terminal.
  • 'su' to root.
  • Type 'gparted'.

Alternatively, use good old fdisk.

Cheers,

Niki

willysr 12-03-2013 05:36 AM

it did work on Slackware 14.0
Probably it don't get along well with newer libraries

willysr 12-03-2013 06:41 AM

Done, now added this issue into KNOWN_ISSUES

aszabo 12-03-2013 01:50 PM

Thanks for the help, anyway all other things run well so far.

willysr 12-03-2013 05:12 PM

Thanks for using and testing MSB :)

Glad you enjoyed it

aszabo 12-04-2013 12:22 PM

I found the solution, you have to install the package gnsu-0.2-noarch-1gv.txz from salix repository, and it works.

willysr 12-04-2013 08:05 PM

yes, i noticed that one, but that one uses sudo and it requires users to change /etc/sudoers
while this worked for MATE 1.6, probably it will not work with MATE 1.8 since mate-file-manager-gksu is now merged along with other mate-file-manager plugins to a single caja-extensions package

gapan 12-05-2013 02:55 AM

Why wouldn't it work with mate 1.8? If it needs gksu, it will work with the gnsu package. If it doesn't need gksu, then you don't have a problem in the first place. The way you package the extension, as a single package or in package that includes multiple extensions, makes absolutely no difference.

mancha 12-05-2013 04:10 AM

Quote:

Originally Posted by willysr (Post 5074506)
it did work on Slackware 14.0
Probably it don't get along well with newer libraries

I have a hunch this might be related to the issue I detail in http://www.linuxquestions.org/questi...ge-4175486942/.

willysr, would you be willing to test my shadow patches (one at a time) to see if that resolves the OP's report? If I'm right, re-building shadow with either patch should solve this issue.

--mancha

willysr 12-05-2013 06:10 AM

using the first patch, the problem still persists

edit: previous attempt was being done with PAM package installed. Now it's gone :)
edit 2: both attempts failed to solve the problem :)

mancha 12-05-2013 11:09 AM

@willysr: Many thanks for testing things but it seems your system is non-standard enough to make troubleshooting a bit more challenging (too many variables). It will probably be more efficient if I work directly with the OP.

@aszabo: I know you've fixed your problem by using gnsu (sudo frontend) instead of gksu (su frontend). However, it would be valuable if you would temporarily revert to your original setup (where gksu was failing) and upgrade your shadow package with my patched version. I have placed the full set of files needed for building here.

The only changes I've made to Slackware's 14.1 shadow source files are: 1) editing shadow.Slackbuild so my patch is applied and changing the package name to include a "_mancha" suffix and 2) including my two patches (only one is applied).

Please let me know if this changes your gksu behavior. Thanks.

--mancha

aszabo 12-05-2013 04:08 PM

Hi, the problem is solved with your pathed shadow package, many thanks for it.

mancha 12-05-2013 05:36 PM

Quote:

Originally Posted by aszabo (Post 5076172)
Hi, the problem is solved with your pathed shadow package, many thanks for it.

Many thanks for confirming my suspicion your issue was related to "su -c" dropping the controlling tty. I've started a thread which discusses "su -c" and will reference this as another example of breakage.

If you're willing to spend a bit more time troubleshooting, it would be good if you rebuilt shadow using the "relax" patch instead of "revert" by changing line 74 of shadow.SlackBuild from:
Code:

patch -p1 --verbose < $CWD/shadow-4.1.5.1_CVE-2005-4890_revert.diff || exit 1
to:
Code:

patch -p1 --verbose < $CWD/shadow-4.1.5.1_CVE-2005-4890_relax.diff || exit 1
I am quite sure it will work with that patch also but user confirmation would be valuable.

--mancha

willysr 12-05-2013 07:56 PM

Good to hear that the patch worked :)
yes, i probably have a non-standard environment since i do most of my testing here on my desktop

For now, i'll wait for upstream (Slackware) to decide on this.
MSB and SBo will get the benefit if this problem is fixed upstream

aszabo 12-06-2013 01:41 PM

I can confirm that the shadow package with relax.diff works too.

mancha 12-06-2013 02:16 PM

Quote:

Originally Posted by aszabo (Post 5076592)
I can confirm that the shadow package with relax.diff works too.

Many thanks for the confirmation.

--mancha

aaditya 12-07-2013 08:18 AM

For me also both the packages worked.

scarrs 02-13-2014 02:56 PM

hi mancha,
I applied your patch and I still get this error: The gksu-run-helper command was not found or is not executable. (when I Alt+f2 gksu thunar) however, running gksu will bring up a window that prompts me to enter the command and user and it seems to run fine. Any ideas as to how I can get the Alt+f2 function to work?

thanks in advance.

--scarrs

EDIT
I got gksu to work using the root password by doing the following:
mkdir /usr/lib/libgksu
ln -s /usr/lib64/libgksu/gksu-run-helper /usr/lib/libgksu/gksu-run-helper
is this acceptable or is it me and I should be able to enter my user passwd instead of the root passwd?

mancha 02-13-2014 04:13 PM

Quote:

Originally Posted by scarrs (Post 5117125)
hi mancha,
I applied your patch and I still get this error: The gksu-run-helper command was not found or is not executable. (when I Alt+f2 gksu thunar)

Hi. Your issue is unrelated to the one solved with my Shadow patch.

But I downloaded gksu, libgksu, and libgtop from SBo to see if I could help. I can reproduce your issue on x86_64 Slackware and tracked down the problem.

The patch I prepared corrects things. Place it in the "patches" dir, make the following change to the SlackBuild script, and rebuild:

Code:

--- libgksu.SlackBuild.SBo
+++ libgksu.SlackBuild
@@ -79,6 +79,11 @@ patch -p0 < $CWD/patches/libgksu-2.0.12-
 patch -p1 < $CWD/patches/libgksu-2.0.12-notests.patch
 patch -p1 < $CWD/patches/libgksu-2.0.12-automake-1.11.2.patch
 
+# Patch from mancha
+if [ "$ARCH" = "x86_64" ]; then
+  patch -p1 < $CWD/patches/libgksu-2.0.12-x86_64-path.diff
+fi
+
 touch NEWS README
 libtoolize --force --copy --install
 autoreconf

--mancha

willysr 02-13-2014 10:28 PM

Applied on SlackBuilds, thanks to Mancha

Drakeo 02-13-2014 11:34 PM

Well Willysr I really enjoy the mate desktop you did. and added it to one of my favorites. keep up the good work.
that fix can be handle with a simple command .

willysr 02-14-2014 02:00 AM

True, but it would be better if it's fixed during the build, so user doesn't need to do additional efforts :)

scarrs 02-14-2014 11:31 AM

Slackbuild help?
 
QUOTE:

"The patch I prepared corrects things. Place it in the "patches" dir, make the following change to the SlackBuild script, and rebuild:"

(removed code)

mancha,

Could you please provide the complete and edited Slackbuild? I am somewhat a novice when it comes to editing a Slackbuild script. I have re-downloaded the patch and am awaiting instructions...

--scarrs

mancha 02-14-2014 12:12 PM

Quote:

Originally Posted by scarrs (Post 5117727)
Could you please provide the complete and edited Slackbuild? I am somewhat a novice when it comes to editing a Slackbuild script. I have re-downloaded the patch and am awaiting instructions...

Hi.

Willy has commited my fixes to his SBo devel branch but they've not yet been pushed to the WWW repo.

Meantime, you can get the files directly from his branch. Go to your build dir (wherever you have libgksu.SlackBuild) and run:

Code:

$ wget -O libgksu.SlackBuild "http://slackbuilds.org/cgit/slackbuilds/plain/libraries/libgksu/libgksu.SlackBuild?h=willysr&id=9dd7ddc97975d3a"
Then switch to the patches sub-dir and download the patch:

Code:

$ cd patches
$ wget -O libgksu-2.0.12-x86_64-path.diff "http://slackbuilds.org/cgit/slackbuilds/plain/libraries/libgksu/patches/libgksu-2.0.12-x86_64-path.diff?h=willysr&id=9dd7ddc97975d3a"

Re-build and you should be good to go.

--mancha

scarrz 09-16-2014 08:01 PM

thank-you, but
 
Quote:

Originally Posted by mancha (Post 5117152)
make the following change to the SlackBuild script, and rebuild:

Code:

--- libgksu.SlackBuild.SBo
+++ libgksu.SlackBuild
@@ -79,6 +79,11 @@ patch -p0 < $CWD/patches/libgksu-2.0.12-
 patch -p1 < $CWD/patches/libgksu-2.0.12-notests.patch
 patch -p1 < $CWD/patches/libgksu-2.0.12-automake-1.11.2.patch
 
+# Patch from mancha
+if [ "$ARCH" = "x86_64" ]; then
+  patch -p1 < $CWD/patches/libgksu-2.0.12-x86_64-path.diff
+fi
+
 touch NEWS README
 libtoolize --force --copy --install
 autoreconf

--mancha

sorry for being a bit of a newb when it comes to editing .SlackBuild scripts but what I did was append the above code to the end of the file and during the build process it asked me which file to patch so I looked at the file it was trying to patch and pointed the build script to that file on my system. it tried to patch the file while I was building the SlackBuild script and I thought this was wrong so I skipped the build. So, where exactly do I make the changes in the .SlackBuild file to have it build properly?

I would really like to have this result:
Code:

gksu thunar
and have it ask for the user password and execute properly.

Code:

gksudo thunar
works just fine but the package is called gksu and I would prefer to use this command.

sorry for my late reply but I was just going over a few things on my system and decided to install gksu on my slackware-current x86_64 system and had the same error reproduced so I would like to fix it. I looked over the thread and have downloaded all the appropriate files and dropped them a folder called shadow with a subdir of patches with your patch as well as the unused subdir there and the patch in it. I am anxiously awaiting your reply.

--G

willysr 09-16-2014 11:30 PM

This problem has been fixed long time ago by Pat himself in other package (shadow)
Quote:

patches/packages/shadow-4.1.5.1-i486-3_slack14.1.txz: Rebuilt.
Shadow 4.1.5 addressed a tty-hijacking vulnerability in "su -c"
(CVE-2005-4890) by detaching the controlling terminal in the non-PAM
case via a TIOCNOTTY request. Bi-directional protection is excessive
and breaks a commonly-used methods for privilege escalation on non-PAM
systems (e.g. xterm -e /bin/su -s /bin/bash -c /bin/bash myscript).
This update relaxes the restriction and only detaches the controlling
tty when the callee is not root (which is, after all, the threat vector).
Thanks to mancha for the patch (and the above information).
you can now issue gksu in normal way and it should work

scarrz 09-26-2014 03:18 AM

Thanks for your reply... I am on slackware-current and am using custom packages from the dropline gnome enviornment including shadow, libgksu, and gksu. the error persists. for now, I am issuing gksudo and everything works fine. I have a pretty good system set up with XFCE and am working on a bare-bones dropline gnome install (gnome doesn't load yet) but all the packages I installed work wonderfully with the XFCE desktop. perhaps I will start a new thread (here) and see what the devs have to say over there. unless of course you have a solution...

willysr 09-26-2014 05:36 AM

I don't have dropline installed, so i can't really give a solution

scarrz 03-21-2015 02:42 PM

you may want to try...
 
you guys, you may want to try executing /usr/bin/gksu-properties and choose "sudo"

this worked for me on Slackware 14.1 with a gksu*_msb.txz package I found on the net (along with libgtop*_msb and libgksu*_msb)

problem solved.


All times are GMT -5. The time now is 08:51 AM.