Artifacts Associated With Ticket 219334
Ticket change [6e44aeabf7] (rid 100117) by nobody on 2000-10-26 05:10:54:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 5082 RFE Version: 8.3.1 SubmitDate: '2000-04-14' LastModified: '2000-04-14' Severity: MED Status: UnAssn Submitter: welch ChangedBy: welch OS: All Unix FixedDate: '2000-10-25' ClosedDate: '2000-10-25' The tcl shells should process a -setuid and -setgid command line argument before the Tcl interpreter is initialized. The problem is that if the setuid is done after the Notifier thread (or any other thread) then on many systems only the main thread changes user ID. After that, the signals used between threads by the pthread implementation fail, therefore condition variables don't work, therefore Tcl locks up. It gets worse. If the Tcl shell wants to open a privileged socket port, it can only do this as root. I'm not sure, but it may be possible to temporarily restore the main thread to root, open the socket, and then switch back. I think setuid lets you do this sort of thing.
- foundin initialized to: "obsolete: 8.3.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "49. Threading"
- title initialized to:
tclsh needs a -setuid and -setgid command line argument
- type initialized to: "RFE"
Ticket change [c0dbb330ca] (rid 102487) by andreas_kupries on 2000-11-16 15:59:46:
- foundin changed to: "obsolete: 8.4a3"
Ticket change [60b71c11f3] (rid 116045) by dgp on 2001-04-04 04:53:08:
- subsystem changed to: "50. Embedding Support"
Ticket change [c6e11b6482] (rid 121846) by dkf on 2001-06-26 05:47:43:
- icomment:
Logged In: YES user_id=79902 I've not seen any Tcl shells that are setuid/setgid by default (there are a lot of security concerns, as you might well imagine, and this has been a source of much trouble to the Perl people) and neither tclsh nor wish provide special support for such command lines. That means that they must be provided by an extension of some kind, and at a guess it might do some processing before calling Tcl_Main() or Tk_Main() (maybe it'll never call those functions at all; I don't care for the purposes of this point) and that is when all this sort of thing should be handled. Thus, in my opinion this is not a fault with Tcl (or Tk) at all, and the request should be passed on to whoever *is* responsible for this (I don't recognise this.)
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "2"
- username: "dkf"
- icomment:
Ticket change [b8b316bd8c] (rid 129008) by hobbs on 2002-03-23 07:53:00:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 see TIP #88
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
Ticket change [3b30d31edb] (rid 261526) by serhiy.storchaka on 2026-11-13 11:18:44:
- closedate changed to: "2461357.9713335303"
- closer changed to: "serhiy.storchaka"
- icomment:
Closing per dkf's comment: changing the user or group id before the interpreter and the notifier thread start is the job of the embedding application (or a wrapper) before it calls Tcl_Main, not of tclsh.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Rejected"
- status changed to: "Closed"