public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Vinson Lee <vlee@freedesktop.org>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] Use absolute path for losetup.
Date: Tue, 25 Mar 2014 15:47:11 +0100	[thread overview]
Message-ID: <20140325144710.GA10096@rei> (raw)
In-Reply-To: <CACKvgLGan6cLbnkoQm4ueqxtTKTxhdW4tH34A46ph6BEyjOZkA@mail.gmail.com>

Hi!
> >> From: Vinson Lee <vlee@twitter.com>
> >>
> >> /sbin may not be in the default $PATH.
> >
> > You are supposed to start runltp as a root, if losetup is not in your
> > $PATH something went wrong on your end.
> >
> > --
> > Cyril Hrubis
> > chrubis@suse.cz
> 
> This situation can arise, for example, on CentOS 5 running LTP with
> sudo instead of directly as root.

That is a "security" feature for sudo. See for example bug:

https://bugzilla.redhat.com/show_bug.cgi?id=80215

You can either add /sbin/ and /bin/ to your PATH manually
(PATH="$PATH:/sbin:/bin" sudo runltp) or add secure_path="/sbin:/bin:"
into /etc/sudoers.

Using absolute paths in LTP is out of question because that would bring
more harm than good. Note that distributions differ on placements for
some of the standard tools and adding a layer for resolving the paths
would add quite a bit complexity for a problem that could be solved by
adding a few paths to the PATH.

On the other hand we should fix the scripts to check if the tool they
use is available (see tst_check_cmds in testcases/lib/test.sh). And
maybe we can print a warning from runltp if /sbin or /bin are not in
$PATH.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2014-03-25 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14  0:00 [LTP] [PATCH] Use absolute path for losetup Vinson Lee
2014-03-17 14:43 ` chrubis
     [not found]   ` <CACKvgLGan6cLbnkoQm4ueqxtTKTxhdW4tH34A46ph6BEyjOZkA@mail.gmail.com>
2014-03-25 14:47     ` chrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140325144710.GA10096@rei \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vlee@freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox