[Libsysio-commit] HEAD: libsysio/src unlink.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2009-08-17 17:47:36
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29758 Modified Files: unlink.c Log Message: Moved permission check from API call to the general p-node unlink so all paths exercise it. Index: unlink.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/unlink.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -w -b -B -p -r1.23 -r1.24 --- unlink.c 4 Aug 2009 15:01:24 -0000 1.23 +++ unlink.c 17 Aug 2009 17:47:22 -0000 1.24 @@ -68,6 +68,8 @@ _sysio_p_unlink(struct pnode *pno) return -ENOENT; /* huh? */ if (S_ISDIR(pno->p_base->pb_ino->i_stbuf.st_mode)) return -EISDIR; + err = _sysio_permitted(pno->p_parent, W_OK); + return -EPERM; /* * Call the FS implementation. */ @@ -103,9 +105,6 @@ SYSIO_INTERFACE_NAME(unlink)(const char pno = NULL; break; } - err = _sysio_permitted(pno->p_parent, W_OK); - if (err) - break; err = _sysio_p_unlink(pno); if (err) break; |