[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#581505: trousers init script should not use --chuid (tcsd does that by itself)


I think I'm also hitting the same problem, but with different
symptom - I cannot start tcsd (0.3.5-2+b1 on sid) at all.
I believe it's the init script at fault.

In /etc/init.d/trousers, it invokes tcsd daemon with

  start-stop-daemon --start --quiet --background \
  --make-pid --pidfile /var/run/tcsd.pid \
  --user tss --chuid tss \
  --exec /usr/sbin/tcsd -- -f

However, tcsd fails to start with this configuration (without
any error message). By removing --chuid tss,

  start-stop-daemon --start --quiet --background \
  --make-pid --pidfile /var/run/tcsd.pid \
  --user tss \ <- HERE
  --exec /usr/sbin/tcsd -- -f

this starts without any problem.

  # ps auxww | grep tcsd
  tss 27852  0.0  0.0  22772  1628 ? S 19:17 0:00 /usr/sbin/tcsd -f

Running uid is also set collectly, as it's done by tcsd itself.

  === src/tcsd/svrside.c ===
  271  #ifndef SOLARIS
  272          pwd = getpwnam(TSS_USER_NAME);
  282          setuid(pwd->pw_uid);
  283  #endif

So I guess removing "--chuid tss" from init script solves the issue.
Also, trying to set running uid outside the program is probably
useless, as TSS_USER_NAME is hardcoded to be "tss" in the source.

Best Regards,
Taisuke Yamada (@tyamadajp)
Old fingerprint = 5229 959A C85D 3C21 923A  41BD 5D60 D687 701E 5AA9
New fingerprint = 9912 2F0A F0A2 4CDC 592A  2731 A03D C4C2 EECA D0AE

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: