Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: USERNAME bug zsh-2.6-beta9



> > "%n" should show the username of the uid running the shell in my opinion as
> > that's what current privileges are in effect.  I guess this qualifies as a
> > minor change from the way it's documented, and it was just "wrong" for so
> > long I got used to it showing name of current uid.  Which beta release did
> > that actually get "fixed"...about b7?
> 
> I think it only came in in beta9. It happend when init.c started using
> getlogin(). It used that well before beta9, but an other bug prevented it
> working.

This is changed in beta10.  USERNAME always comes from pswd->pw_name
now.  Also USERNAME is now magical so that if you are root, executing

USERNAME=username

will change the username and uid the shell is executing under.  Also,
as root, you can execute command under other usernames/uid by

USERNAME=nobody command.

I'm putting the finishing touches on beta10.  There have been a lot of
internal changes and code reorganization.

rc



Messages sorted by: Reverse Date, Date, Thread, Author