DragonFly BSD
DragonFly bugs List (threaded) for 2010-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1701] mkdir / returns EPERM instead of EEXIST (related to pkg_add)


From: "Alex Hornung \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Mar 2010 13:30:39 +0000

Alex Hornung <ahornung@gmail.com> added the comment:

I can't take care of this this week, so I'll just give you the pointers:
The following lines in kern/vfs_nlookup.c are probably causing your issue. this
is called from many points, including from kern_mkdir to check if a directory
already exists. If nlookup returns EPERM, kern_mkdir just returns that.


    471 	    /*
    472 	     * Fast-track termination.  There is no parent directory of
    473 	     * the root in the same mount from the point of view of
    474 	     * the caller so return EPERM if NLC_REFDVP is specified.
    475 	     * e.g. 'rmdir /' is not allowed.
    476 	     */
    477 	    if (*ptr == 0) {
    478 		if (nd->nl_flags & NLC_REFDVP)
    479 			error = EPERM;
    480 		else
    481 			error = 0;
    482 		break;
    483 	    }
    484 	    continue;


Cheers,
Alex Hornung

----------
priority:  -> bug

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1701>
_____________________________________________________




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