#include <sys/file.h>
#include <sys/stat.h>
#include <sys/proc.h>
+#include <sys/priv.h>
#include <sys/mount.h>
#include <sys/nlookup.h>
#include <sys/vnode.h>
}
sb->st_flags = vap->va_flags;
- if (suser_cred(cred, 0))
+
+ error = priv_check_cred(cred, PRIV_VFS_GENERATION, 0);
+ if (error)
sb->st_gen = 0;
else
sb->st_gen = (u_int32_t)vap->va_gen;