Re: [patch 4/8] nfsd: rename MAY_ flags

From: Miklos Szeredi
Date: Fri May 30 2008 - 05:53:53 EST


> These three constants are very much ingrained in the UNIX tradition,
> and it's no accident that the MAY_ flags correspond exactly to the
> i_mode bits, which is something often exploited by permission checking
> code.

Funny example of naming confusion:

> asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode)
> {
> ...
> if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
> return -EINVAL;

The MAY_* namespace is never mentioned, even though that's the one
most relevant here :)

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