Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  sux "cannot set terminal process group ...." error  (Read 7584 times)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
After d-u today, when you run "sux" in the terminal to become root, you can expect to see an error like this:

Code: [Select]
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell



There is a bug report:  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659878

The error does not prevent root from doing root work.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
sux "cannot set terminal process group ...." error
« Reply #1 on: 2012/02/17, 22:45:16 »

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
sux "cannot set terminal process group ...." error
« Reply #2 on: 2012/02/17, 22:48:19 »
Aha -- danke, Devil.   :)
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
sux "cannot set terminal process group ...." error
« Reply #3 on: 2012/02/17, 23:06:02 »
The reason for this is to be found in the changelog of login:
Quote
* New upstream release:
- su: Fix possible tty hijacking by dropping the controlling terminal when
executing a command (CVE-2005-4890). Closes: #628843


greetz
devil

braveheartleo

  • Guest
sux "cannot set terminal process group ...." error
« Reply #4 on: 2012/02/23, 01:59:20 »
What is broken by the change, which is indicated by this message, is the ability to control foreground jobs (e.g., ctrl+c) from the terminal after logging in from sux.

su, gksu and others are not affected by the change, and can still control and terminate hang-up jobs running in the foreground by doing job control key combinations in the terminal.

To demonstrate:
Code: [Select]
$ su
Passsword: (enter root password)
# cat /dev/zero > /dev/null
(terminal hangs, ctrl+c to kill the job)

$ sux
Passsword: (enter root password)
# cat /dev/zero > /dev/null
(terminal hangs, ctrl+c ends the session with:
Session terminated, terminating shell...^C
but the job is left running. kill the job from another terminal)


quoted from here:
Quote
This needs to be investigated further (in particular to check what sux is
doing, and whether this could be fixed on the sux side).
(The fix removes the controlling terminal for non-interactive executions)

Offline anticapitalista

  • User
  • Posts: 11
    • http://antix.mepis.org/
sux "cannot set terminal process group ...." error
« Reply #5 on: 2012/02/25, 01:20:41 »
su -c bash
gives the same error.