Re: problems with changing UID/GID

Chris Wedgwood (cw@f00f.org)
Tue, 27 Aug 2002 13:00:25 -0700


On Tue, Aug 27, 2002 at 01:08:04PM -0600, Thunder from the hill wrote:

And how do you protect a caller from having to wait for the lock?

You don't. If they have to wait, then they wait.

You'd need a lock count here, where you can only change the
credentials when the count is zero. But when will that ever be?

It depends... for most non-threaded applications, immediately... for
threaded applications with lots of (day) disk IO, it could be
indefinite.

And btw, the count bumping/downing does cost.

Almost immeasurable. [sg]et[eu]id doesn't get called that often.

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