Hi,

On Thu, Nov 19, 2009 at 10:28:37AM +0200, Sergiu Ivanov wrote:

> +  /* Fetch the effective UIDs of the unionfs process.  */
> +  nuids = geteuids (0, 0);
> +  if (nuids < 0)
> +    return EPERM;
> +  uids = alloca (nuids * sizeof (uid_t));
> +
> +  nuids = geteuids (nuids, uids);
> +  assert (nuids > 0);

Hrmph, I didn't spot this before: I don't think the assert() is right --
"nuids" (or "ngids") being exactly 0, is probably a perfectly valid
case... And even if it is not, the test in the assert should be
equivalent to the EPERM test above, to avoid confusion.

> +  /* The mountee will be sitting on this node.  This node is based on
> +     the netnode of the root node (it is essentially a clone of the
> +     root node), so that unionfs appears as the underlying translator
> +     to the mountee.  Note the we cannot set the mountee on the root
> +     node directly, because in this case the mountee's filesystem will
> +     obscure the filesystem published by unionfs.  */

Grammar nitpick: it should be "*would* obscure" :-)

(It don't think it hampers understanding though, so I can't say that I
really care... Just a hint for you :-) )

-antrik-


Reply via email to