NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/39124: VOP_CREATE() gets no uid/gid in vattr

>Number:         39124
>Category:       kern
>Synopsis:       VOP_CREATE() gets no uid/gid in vattr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 10 16:25:00 +0000 2008
>Originator:     Reinoud Zandijk
>Release:        NetBSD 4.99.55
System: NetBSD 4.99.55 NetBSD 4.99.55 (GENERIC) #0: 
Sun Mar 2 21:22:35 CET 2008
Architecture: i386
Machine: i386
When implementing UDF i found that the vattr argument passed on every
VOP_CREATE() always specified (uid=-1, gid=-1). I assumed these were the
defaults and that the kernel would issue a VOP_SETATTR() with the correct
uid/gid later.

When confronted with wierd uid/gid access results, i dug into tmpfs and UFS
and noticed that they didn't even pass the vattr down but both use
        uid = kauth_cred_geteuid(cnp->cn_cred);
        gid = parent_dir->gid;

Shouldn't these uid/gid's be passed in the VOP_CREATE()'s vattr?

Check the passed uid/gid on VOP_CREATE() to any FS.
Take up this code in the VOP_CREATE() calling code or in the veneers?



Home | Main Index | Thread Index | Old Index