Vulnerability Development mailing list archives

Re: BSD chfn bug


From: imp () VILLAGE ORG (Warner Losh)
Date: Tue, 28 Dec 1999 10:05:40 -0700


In message <19991228165015.94446.qmail () hotmail com> "FARAZ JAMSHED" writes:
: >>In message <Pine.LNX.4.20.9912251656310.23074->>100000 () pet notbsd org>
: >>"Stanislav N. Vardomskiy" writes:
: >>: This just *might* be a problem.
: >
: >Not the way you think.  You have no control over the name of the file
: >created.
: >
: >Warner
:
: yes we could have control by setting the right UMASK settings...

How?  It creates the file in /etc.  You must have write permissions to
the directory in order to rename files, which you won't have unless
you are already root.  Setting the permissions on the *file* won't
change this at all.  You still can't rename it (and I did try just
now).  And since chfn, et al use mkstemp, you can't race it either.

Warner


Current thread: