lkml.org 
[lkml]   [1998]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: High UID support for Linux
Date
Followup to:  <5liufwy8bs.fsf@tequila.cs.yale.edu>
By author: Stefan Monnier <monnier+lists/linux/kernel/news/@tequila.cs.yale.edu>
In newsgroup: linux.dev.kernel
>
> > Incidentally, remember that not all programs will load registers in
> > the same order, and that the arguments pushed on the stack are not
> > necessarily done consecutively...
>
> And since the problem is to replace getpwent with getenv(HOME), you have to
> recognize that the output of getpwent is only used to extract the home
> directory and then patch it up correctly. So much trouble, so little gain.
>

It's also important to recognize that using getpwent to extract one's
own home directory is *WRONG*. HOME and USER may point to a different
place/user than getuid() and getpwuid(getuid()) will give you; this is
quite common for setuid programs and when using su -m.

-hpa
--
PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See http://www.zytor.com/~hpa/ for web page and full PGP public key
I am Bahá'í -- ask me about it or see http://www.bahai.org/
"To love another person is to see the face of God." -- Les Misérables

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.044 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site