[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: add user ?



Dave Kinchlea writes:
>Are you always this friendly or are you saving your special sarcasm for
>me?

Sorry -- I hadn't seen the ln suggestion.  But my point was that I
had posted it specifically in response to Sasha's posts that said
explicitly that that race condition was *not* a concern -- the
concern that it addressed was the reading a corrupt file concern.

Also, there is no guarantee that running the ln *program* will give
you an atomic lock.  It may reduce the window, but I'm not even
convinced of that, because the fact that we are running bash means
that the tests that are being done do not involve fork/exec and
therefore mean that it's less likely that the scheduler will be
invoked, so the practical upshot is that I am not convinced that
the ln solution narrows the window, practically speaking.

>Sasha's concern was that two people might be
>using adduser at the same time,

No, Sasha's concern was that a partially-written file would be read.
My fixed script solved that concern.

>race, you may not feel it is needed, that is fine but to simply push it
>off as `this is a shell script' [and so there is nothing to be done] is,
>IMHO, shortsighted.

No, it's practical.  I'd like in the long term to replace adduser with
a good C program, perhaps based on the one from the shadow suite, but
in the short term, my solution was reasonable and addressed Sasha's
concerns.

Furthermore, if you were reading earlier, I pointed out that our
Python usercfg script should be provide atomic locking, which addresses
your concern, at least from the GUI.

michaelkjohnson

"Ever wonder why the SAME PEOPLE make up ALL the conspiracy theories?"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []