GNU bug report logs - #40901
gnu: ktsuss: Fix paths.

Previous Next

Package: guix-patches;

Reported by: Raghav Gururajan <raghavgururajan <at> disroot.org>

Date: Mon, 27 Apr 2020 13:38:01 UTC

Severity: normal

Tags: fixed

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 40901 <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: Raghav Gururajan <raghavgururajan <at> disroot.org>
Cc: 40901 <at> debbugs.gnu.org
Subject: Re: [bug#40901] gnu: ktsuss: Fix paths.
Date: Mon, 27 Apr 2020 18:21:31 +0200
Raghav Gururajan writes:

Hello Raghav,

> From ecdb9f73f2aa9854f03ace199fcc4c4547a2be49 Mon Sep 17 00:00:00 2001
> From: Raghav Gururajan <raghavgururajan <at> disroot.org>
> Date: Mon, 27 Apr 2020 09:32:43 -0400
> Subject: [PATCH] gnu: ktsuss: Fix paths.
>
> * gnu/packages/admin.scm (ktsuss): Fix paths.

I changed the commit message to

--8<---------------cut here---------------start------------->8---
gnu: ktsuss: Use setuid "su" and "sudo" commands.

This has ktsudo actually gain root access.

* gnu/packages/admin.scm (ktsuss)[arguments]: Instead of <sudo>/bin/{su,sudo}
file names, use the setuid' verrsions.
--8<---------------cut here---------------end--------------->8---

When there is a fix being made, a short explanation is nice to have.
What was wrong that the file name were changed, what was fixed?

Also, we are (mainly) fixing the file names of SU and SUDO, not PATHs.

> -         (add-after 'unpack 'patch-sudo-path
> -           (lambda* (#:key inputs #:allow-other-keys)
> +         (add-after 'unpack 'patch-paths

Renamed to 'patch-file-names'

> +           (lambda* (#:key inputs outputs #:allow-other-keys)

Parameters inputs and outputs are both not used; I changed this to

+           (lambda _

> +             (substitute* "src/ktsuss.c"
> +               (("/usr/sbin:/usr/local/sbin:/sbin")
> +                "~/.guix-profile/sbin"))

No way!  :-)

I removed/did not apply this change.

>               (substitute* "configure.ac"
> +               (("supath=`which su 2>/dev/null`")
> +                "supath=/run/setuid-programs/su")
>                 (("sudopath=`which sudo 2>/dev/null`")
> -                (string-append "sudopath="
> -                               (string-append (assoc-ref inputs "sudo")
> -                                              "/bin/sudo"))))
> +                "sudopath=/run/setuid-programs/sudo"))

LGTM!

Can you please remember to test a program before submitting it?  And I
mean not only check if "it runs", but also if it is actually useful?

Pushed to master with these changes.

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




This bug report was last modified 5 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.