tech-userlevel archive

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

Re: Proposal for write(1) addition

On Sat, Sep 17, 2011 at 11:49:00AM +0200, Julian Fagir wrote:
> Hi,
> > > according to somebody from the #tmux-channel in freenode, tmux does not
> > > set utmp entries because they would need additional permissions for that.
> > 
> > That could be easily fixed by adding a utmp-writing daemon that took
> > unix domain messages from clients.  Each message would pass both creds,
> > so the user in question could be authenticated, and rights, so the
> > utmp daemon could validate that in fact the client had an open file
> > descriptor to the terminal it was claiming to be logged in on.
> > 
> > This would have the added benefit that the utmp writing daemon could
> > run as a _utmp role account instead of as root...
> > 
> > Should work, no?
> this would have been the cleanest solution, if you had it right from the
> beginning on.

I can just put the code in libutil for all callers.

Now if I only had something bigger than a smartphone to type on...
it'll have to go on my list, for the moment.

> Adding it now would end up in complexity of another daemon running and using
> memory for something elementary as write, being incompatible with all other
> OSs.
> You would have to fix *all* programs (in pkgsrc) that create shells - that's
> not only tmux, but afaik most of the X terminal emulations out there.
> With respect to tmux, I don't know much about the import into base, but even
> now it is not the most recent version (1.4 vs. 1.5), patching such things
> would make it harder to update base's tmux.
> This would be a *lot* of work for just a small issue (I don't know how long
> the ptyfs issue was there but undiscovered)
> I think it's just the way ptys are used that changed and it is nothing bad
> (with screen starting login shells, `w` shows me >60 users on my system).
> Instead of changing every single program into that raster, adapting the few
> tools that read utmp is less work and more appropriate to the situation utmp
> is used for.
> Regards, Julian

Thor Lancelot Simon                          
  "All of my opinions are consistent, but I cannot present them all
   at once."    -Jean-Jacques Rousseau, On The Social Contract

Home | Main Index | Thread Index | Old Index