tech-kern archive

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

Re: UFS extended attributes broken



On Sat, Apr 28, 2012 at 07:36:08PM +0200, Emmanuel Dreyfus wrote:
 > On -current and netbsd-6, starting extended attributes is broken. I just
 > fixed a NULL pointer reference that caused a panic, but there is another
 > problem.
 > 
 > ufs_extattr_autostart() needs to lookup .attribute/user and
 > .attribute/system directories on the top of the filesystem. It is done
 > through ufs_extattr_lookup(),which does this:
 > 
 >         memset(&cnp, 0, sizeof(cnp));
 >         cnp.cn_nameiop = LOOKUP;
 >         cnp.cn_flags = ISLASTCN | lockparent;
 >         cnp.cn_cred = l->l_cred;
 >         cnp.cn_nameptr = pnbuf;
 >         error = copystr(dirname, pnbuf, MAXPATHLEN, &cnp.cn_namelen);
 >         if (error) {
 >         /* removed error handling for clarty sake */
 >         }
 >         cnp.cn_namelen--;       /* trim nul termination */
 >         vargs.a_desc = NULL;
 >         vargs.a_dvp = start_dvp;
 >         vargs.a_vpp = &target_vp;
 >         vargs.a_cnp = &cnp;
 >         error = ufs_lookup(&vargs);
 >  
 > ufs_lookup now returns ENOENT while the directory exists. It did not do
 > that on netbsd-5. Any idea of what when wrong?

I don't know, but: is .attribute supposed to be hidden from ordinary
user access? If so, it's probably being hidden from this access as
well.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index