Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #241632

Re: xhost-command in Debian1

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: xhost-command in Debian1
Date 2021-10-24 15:20 +0200
Message-ID <DbLzQ-1OA-19@gated-at.bofh.it> (permalink)
References (1 earlier) <Cqno5-1AL-1@gated-at.bofh.it> <Db3Iu-8ry-13@gated-at.bofh.it> <Db41Q-6s-7@gated-at.bofh.it> <Dbu5X-7Dt-9@gated-at.bofh.it> <DbEI2-5VO-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Oct 24, 2021 at 04:59:06PM +1100, Keith Bainbridge wrote:
> 
> On 24/10/21 05:31, Charles Curley wrote:
> > alias su="su --whitelist-environment=DISPLAY,XAUTHORITY"
> 
> 
> Doesn't that mean that when you type 'su' at a command prompt, the response
> will be running the command
> --whitelist-environment=DISPLAY,XAUTHORITY
> as root.

No.  It will run the command   su --whitelist-environment=DISPLAY,XAUTHORITY
which has setuid privileges, and therefore will run with effective UID 0.

It's a lot like doing   alias ls='ls --color=auto'

The second ls inside the alias expansion becomes the new command that
gets executed.  Aliases don't recurse into themselves, which is by
design so that people can do things exactly like this.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: xhost-command in Debian11 Charles Curley <charlescurley@charlescurley.com> - 2021-10-22 16:30 +0200
  Re: xhost-command in Debian11 David Wright <deblis@lionunicorn.co.uk> - 2021-10-22 16:50 +0200
    Re: xhost-command in Debian1 Charles Curley <charlescurley@charlescurley.com> - 2021-10-23 20:40 +0200
      Re: xhost-command in Debian1 Keith Bainbridge <keithrbaugroups@gmail.com> - 2021-10-24 08:00 +0200
        Re: xhost-command in Debian1 Greg Wooledge <greg@wooledge.org> - 2021-10-24 15:20 +0200
  Re: xhost-command in Debian11 Reco <recoverym4n@enotuniq.net> - 2021-10-22 17:00 +0200

csiph-web