Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 1995 00:50:32 -0700 (PDT)
From:      Julian Elischer <julian@ref.tfs.com>
To:        hackers@freebsd.org
Subject:   suspect code in 'unlink' syscall.
Message-ID:  <199509180750.AAA01170@ref.tfs.com>

next in thread | raw e-mail | index | archive | help
looking at 'unlink (2)'
I see,
        if (vp->v_type != VDIR ||
            (error = suser(p->p_ucred, &p->p_acflag)) == 0) {
                /*
                 * The root of a mounted filesystem cannot be deleted.
                 */
                if (vp->v_flag & VROOT)
                        error = EBUSY;
                else
                        (void) vnode_pager_uncache(vp);
        }

I translate this as:
"if it's not a DIR, or we are root",
check if we are deleteing the 
root of an FS,
if not, flush cache......

now, if we were NOT root, and it IS a dir...... (normal...)

can we delete it?
I'm about to try this..
if you dont hear from me, the building exploded...

julian :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509180750.AAA01170>