libsysio-commit Mailing List for libsysio (Page 3)
Brought to you by:
lward
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(25) |
May
(28) |
Jun
(25) |
Jul
(30) |
Aug
(60) |
Sep
(52) |
Oct
(100) |
Nov
(15) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(89) |
Feb
(48) |
Mar
(22) |
Apr
(59) |
May
(16) |
Jun
(15) |
Jul
(50) |
Aug
(26) |
Sep
(40) |
Oct
(27) |
Nov
(12) |
Dec
|
2005 |
Jan
(24) |
Feb
(11) |
Mar
|
Apr
|
May
(3) |
Jun
(6) |
Jul
|
Aug
(14) |
Sep
(21) |
Oct
(10) |
Nov
|
Dec
|
2006 |
Jan
(8) |
Feb
(5) |
Mar
(2) |
Apr
(6) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2007 |
Jan
(3) |
Feb
(5) |
Mar
(20) |
Apr
(41) |
May
(21) |
Jun
(3) |
Jul
(5) |
Aug
(12) |
Sep
(21) |
Oct
(5) |
Nov
(16) |
Dec
|
2008 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(23) |
May
|
Jun
(22) |
Jul
(13) |
Aug
|
Sep
|
Oct
(9) |
Nov
(3) |
Dec
(13) |
2009 |
Jan
(14) |
Feb
(10) |
Mar
(2) |
Apr
(11) |
May
(7) |
Jun
(1) |
Jul
(1) |
Aug
(36) |
Sep
(12) |
Oct
|
Nov
|
Dec
(10) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Lee W. <lw...@us...> - 2009-08-04 05:52:32
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10579 Modified Files: link.c Log Message: Weird thred-safe logic removed; I'll desl with it later when I get after the big lock. Modified to work with the new PB_SET_ASSOC logic. Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- link.c 3 Aug 2009 17:55:27 -0000 1.19 +++ link.c 4 Aug 2009 05:52:23 -0000 1.20 @@ -82,7 +82,7 @@ _sysio_p_link(struct pnode *old, struct if (err) return err; PB_SET_ASSOC(new->p_base, old->p_base->pb_ino); - I_REF(new->p_base->pb_ino); + I_GET(new->p_base->pb_ino); return 0; } @@ -103,28 +103,21 @@ SYSIO_INTERFACE_NAME(link)(const char *o _sysio_namei(_sysio_cwd, oldpath, 0, &intent, &old); if (err) break; - P_REF(old); - P_PUT(old); INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL); err = _sysio_namei(_sysio_cwd, newpath, ND_NEGOK, &intent, &new); if (err) break; - P_REF(new); - P_PUT(new); if (new->p_base->pb_ino) { err = -EEXIST; break; } - _sysio_p_get2(old, new->p_parent); err = _sysio_p_link(old, new); - P_PUT(new->p_parent); - P_PUT(old); } while (0); if (new) - P_RELE(new); + P_PUT(new); if (old) - P_RELE(old); + P_PUT(old); SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, link, "%d", 0); } |
From: Lee W. <lw...@us...> - 2009-08-04 05:46:35
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9719/include Modified Files: inode.h Log Message: Altered PB_SET_ASSOC to take a reference on each association ad drop one on disassociates. This to save the effort, everywhere it's used, of doing the same thing. Tracked down everywhere it's used and got rid of all the I_REF logic. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.56 retrieving revision 1.57 diff -u -w -b -B -p -r1.56 -r1.57 --- inode.h 3 Aug 2009 19:46:39 -0000 1.56 +++ inode.h 4 Aug 2009 05:46:24 -0000 1.57 @@ -411,6 +411,7 @@ struct pnode_base { assert(!(_ino)); \ _I_CHECK_LOCK((_pb)->pb_ino, 1); \ LIST_REMOVE((_pb), pb_alinks); \ + _I_RELE_NO_LOCK((_pb)->pb_ino); \ } \ (_pb)->pb_ino = (_ino); \ if ((_pb)->pb_ino) { \ @@ -418,13 +419,22 @@ struct pnode_base { LIST_INSERT_HEAD(&(_pb)->pb_ino->i_assoc, \ (_pb), \ pb_alinks); \ + _I_REF_NO_LOCK((_pb)->pb_ino); \ } \ } while (0) #else #define PB_SET_ASSOC(_pb, _ino) \ do { \ assert(!((_pb)->pb_ino && (_ino))); \ + if ((_pb)->pb_ino) { \ + _I_CHECK_LOCK((_pb)->pb_ino, 1); \ + _I_RELE_NO_LOCK((_pb)->pb_ino); \ + } \ (_pb)->pb_ino = (_ino); \ + if ((_pb)->pb_ino) { \ + _I_CHECK_LOCK((_pb)->pb_ino, 1); \ + _I_REF_NO_LOCK((_pb)->pb_ino); \ + } \ } while (0) #endif |
From: Lee W. <lw...@us...> - 2009-08-04 05:46:33
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9719/src Modified Files: inode.c Log Message: Altered PB_SET_ASSOC to take a reference on each association ad drop one on disassociates. This to save the effort, everywhere it's used, of doing the same thing. Tracked down everywhere it's used and got rid of all the I_REF logic. Index: inode.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/inode.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -w -b -B -p -r1.55 -r1.56 --- inode.c 28 Jan 2009 16:13:19 -0000 1.55 +++ inode.c 4 Aug 2009 05:46:24 -0000 1.56 @@ -513,8 +513,6 @@ _sysio_pb_new(struct qstr *name, struct name = &noname; PB_INIT(pb, name, parent); PB_SET_ASSOC(pb, ino); - if (ino) - I_REF(ino); PB_LOCK(pb); if (pb->pb_key.pbk_parent) { @@ -597,7 +595,6 @@ _sysio_pb_gone(struct pnode_base *pb) free(pb); if (ino) { - I_RELE(ino); if (!(ino->i_ref || ino->i_immune || I_ISASSOC(ino))) _sysio_i_gone(ino); else @@ -898,7 +895,6 @@ _sysio_p_validate(struct pnode *pno, str * Make valid. */ PB_SET_ASSOC(pno->p_base, ino); - I_REF(pno->p_base->pb_ino); } else if (pno->p_base->pb_ino != ino) { /* * Path resolves to a different inode, now. The |
From: Lee W. <lw...@us...> - 2009-08-03 23:19:07
|
Update of /cvsroot/libsysio/libsysio/misc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25532 Modified Files: fhi.c Log Message: fhi_getdirentries64 routine failed unless somebody already had the directory open. We must always open and close it ourselves. Fixed. Index: fhi.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/misc/fhi.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- fhi.c 28 Jul 2009 17:00:04 -0000 1.3 +++ fhi.c 3 Aug 2009 23:18:52 -0000 1.4 @@ -1031,7 +1031,13 @@ SYSIO_INTERFACE_NAME(fhi_getdirentries64 err = -ESTALE; break; } + + cc = _sysio_open(pno, O_RDONLY, 0); + if (cc) + break; cc = _sysio_p_filldirentries(pno, buf, nbytes, basep); + if (PNOP_CLOSE(pno) != 0) + abort(); P_PUT(pno); } while (0); |
From: Lee W. <lw...@us...> - 2009-08-03 23:04:09
|
Update of /cvsroot/libsysio/libsysio/misc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23601 Modified Files: fhi.h Log Message: Bad prototype; fhi_getdirents64 is actually fhi_getdirentries64. Fixed. Index: fhi.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/misc/fhi.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -b -B -p -r1.1 -r1.2 --- fhi.h 4 Feb 2009 20:07:23 -0000 1.1 +++ fhi.h 3 Aug 2009 23:03:53 -0000 1.2 @@ -181,8 +181,7 @@ extern int SYSIO_INTERFACE_NAME(fhi_mkdi mode_t mode); extern int SYSIO_INTERFACE_NAME(fhi_rmdir)(struct file_handle_info_dirop_args *where); -extern ssize_t SYSIO_INTERFACE_NAME(fhi_getdirents64)(struct file_handle_info - *fhi, +extern ssize_t SYSIO_INTERFACE_NAME(fhi_getdirentries64)(struct file_handle_info *fhi, char *buf, size_t nbytes, off64_t |
From: Lee W. <lw...@us...> - 2009-08-03 19:48:29
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29518/src Modified Files: access.c Log Message: Two changes: 1) Fixed bug in access; It was using effective IDs instead of real. 2) Created new _sysio_epermitted routine that allows caller to specify which IDs to use. The old routine _sysio_permitted still uses effective. Index: access.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/access.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- access.c 5 May 2009 16:30:18 -0000 1.20 +++ access.c 3 Aug 2009 19:48:19 -0000 1.21 @@ -82,7 +82,7 @@ static struct user_credentials { * Check given access type on given inode. */ static int -check_permission(struct pnode *pno, struct creds *crp, int amode) +check_permission(struct pnode *pno, struct creds *cr, int amode) { mode_t mask; struct inode *ino; @@ -111,8 +111,9 @@ check_permission(struct pnode *pno, stru if (amode & X_OK) mask |= S_IXUSR; + assert(P_ISLOCKED(pno) && PB_ISLOCKED(pno->p_base)); ino = pno->p_base->pb_ino; - assert(ino); + assert(ino && I_ISLOCKED(ino)); err = -EACCES; /* assume error */ stat = &ino->i_stbuf; @@ -121,7 +122,7 @@ check_permission(struct pnode *pno, stru /* * Root? */ - if (_sysio_is_root(crp)) { + if (_sysio_is_root(cr)) { err = 0; break; } @@ -130,7 +131,7 @@ check_permission(struct pnode *pno, stru /* * Owner? */ - if (stat->st_uid == crp->creds_uid) { + if (stat->st_uid == cr->creds_uid) { if ((stat->st_mode & mask) == mask) err = 0; break; @@ -141,8 +142,8 @@ check_permission(struct pnode *pno, stru */ mask >>= 3; group_matched = 0; - gids = crp->creds_gids; - ngids = crp->creds_ngids; + gids = cr->creds_gids; + ngids = cr->creds_ngids; while (ngids) { ngids--; if (stat->st_gid == *gids++) { @@ -320,6 +321,9 @@ _sysio_p_generic_perms_check(struct pnod cr = NULL; break; } + assert(P_ISLOCKED(pno) && + PB_ISLOCKED(pno->p_base) && + pno->p_base->pb_ino && I_ISLOCKED(pno->p_base->pb_ino)); err = (*_sysio_check_permission)(pno, cr, amode); } while (0); if (cr) @@ -327,8 +331,8 @@ _sysio_p_generic_perms_check(struct pnod return err; } -static int -permitted(struct pnode *pno, int amode, int effective) +int +_sysio_epermitted(struct pnode *pno, int amode, int effective) { return PNOP_PERMS_CHECK(pno, amode, effective); @@ -341,7 +345,7 @@ int _sysio_permitted(struct pnode *pno, int amode) { - return permitted(pno, amode, 0); + return _sysio_epermitted(pno, amode, 1); } #ifdef ZERO_SUM_MEMORY @@ -377,7 +381,10 @@ SYSIO_INTERFACE_NAME(access)(const char pno = NULL; break; } - err = permitted(pno, amode, 1); + /* + * Check, using real IDs. + */ + err = _sysio_epermitted(pno, amode, 0); } while (0); if (pno) P_PUT(pno); |
From: Lee W. <lw...@us...> - 2009-08-03 19:46:49
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29491/include Modified Files: inode.h Log Message: Export new global, _sysio_epermitted. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.55 retrieving revision 1.56 diff -u -w -b -B -p -r1.55 -r1.56 --- inode.h 3 Aug 2009 19:33:03 -0000 1.55 +++ inode.h 3 Aug 2009 19:46:39 -0000 1.56 @@ -852,6 +852,7 @@ extern int _sysio_path_walk(struct pnode #ifdef AUTOMOUNT_FILE_NAME extern void _sysio_next_component(const char *path, struct qstr *name); #endif +extern int _sysio_epermitted(struct pnode *pno, int amode, int effective); extern int _sysio_permitted(struct pnode *pno, int amode); extern int _sysio_namei(struct pnode *pno, const char *path, |
From: Lee W. <lw...@us...> - 2009-08-03 19:33:17
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27194/include Modified Files: inode.h Log Message: Added macros P_ISLOCKED, PB_ISLOCKED, I_ISLOCKED that return positive if the entity is locked or zero, if not. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -w -b -B -p -r1.54 -r1.55 --- inode.h 5 May 2009 16:34:01 -0000 1.54 +++ inode.h 3 Aug 2009 19:33:03 -0000 1.55 @@ -190,10 +190,13 @@ struct inode { _I_INIT_MORE(ino); \ } while (0) +#define I_ISLOCKED(_ino) \ + ((_ino)->i_lckcnt) + #ifdef LOCK_DEBUG #define _I_CHECK_LOCK(_ino, _test) \ - (assert(((_test) && (_ino)->i_lckcnt) || \ - !((_test) || (_ino)->i_lckcnt))) + (assert(((_test) && I_ISLOCKED(_ino)) || \ + !((_test) || I_ISLOCKED(_ino)))) #else #define _I_CHECK_LOCK(_ino, _test) #endif @@ -343,10 +346,13 @@ struct pnode_base { LIST_INIT(&(_pb)->pb_aliases); \ } while (0) +#define PB_ISLOCKED(_pb) \ + ((_pb)->pb_lckcnt) + #ifdef LOCK_DEBUG #define _PB_CHECK_LOCK(_pb, _test) \ - (assert(((_test) && (_pb)->pb_lckcnt) || \ - !((_test) || (_pb)->pb_lckcnt))) + (assert(((_test) && PB_ISLOCKED(_pb)) || \ + !((_test) || PB_ISLOCKED(_pb)))) #else #define _PB_CHECK_LOCK(_pb, _test) #endif @@ -482,10 +488,13 @@ struct pnode { (_pno)->p_cover = (_cover); \ } while (0) +#define P_ISLOCKED(_pno) \ + ((_pno)->p_lckcnt) + #ifdef LOCK_DEBUG #define _P_CHECK_LOCK(_pno, _test) \ - (assert(((_test) && (_pno)->p_lckcnt) || \ - !((_test) || (_pno)->p_lckcnt))) + (assert(((_test) && P_ISLOCKED(_pno)) || \ + !((_test) || P_ISLOCKED(_pno)))) #else #define _P_CHECK_LOCK(_pno, _test) #endif |
From: Lee W. <lw...@us...> - 2009-08-03 17:55:36
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14443 Modified Files: link.c Log Message: Oh heck! Redundant implementations of _sysio_p_{rmdir,symlink,rename} removed, just like the previous check-in. Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -b -B -p -r1.18 -r1.19 --- link.c 3 Aug 2009 17:47:42 -0000 1.18 +++ link.c 3 Aug 2009 17:55:27 -0000 1.19 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2007 Sandia Corporation. + * Cplant(TM) Copyright 1998-2009 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -86,133 +86,6 @@ _sysio_p_link(struct pnode *old, struct return 0; } -/* - * Perform symlink operation; oldpath to new. - */ -int -_sysio_p_symlink(const char *oldpath, struct pnode *new) -{ - - if (new->p_base->pb_ino) - return -EEXIST; - if (IS_RDONLY(new->p_parent)) - return -EROFS; - return PNOP_SYMLINK(new, oldpath); -} - -/* - * Perform remove directory operation on some pnode. - */ -int -_sysio_p_rmdir(struct pnode *pno) -{ - int err; - - if (IS_RDONLY(pno)) - return -EROFS; - if (!pno->p_base->pb_ino) - return -ENOENT; /* huh? */ - if (!S_ISDIR(pno->p_base->pb_ino->i_stbuf.st_mode)) - return -ENOTDIR; - /* - * Don't allow unlink of a root or a mount point. - */ - if (pno->p_cover || pno->p_mount->mnt_root == pno) - return -EBUSY; - /* - * Call the FS implementation. - */ - err = PNOP_RMDIR(pno); - if (err) - return err; - /* - * Clean the namespace graphs to reflect the unlink. - */ - _sysio_i_undead(pno->p_base->pb_ino); - _sysio_pb_disconnect(pno->p_base); - return 0; -} - -/* - * Perform rename operation on some pnode. - */ -int -_sysio_p_rename(struct pnode *old, struct pnode *new) -{ - struct pnode_base *nxtpb, *pb; - int err; - - /* - * Check for rename to self. - */ - if (old == new) - return 0; - - /* - * No xdev renames please. - */ - if (old->p_mount->mnt_fs != new->p_mount->mnt_fs) - return -EXDEV; - - /* - * Must not be a read-only mount. - * - * NB: Invariant old->p_mount->mnt_fs == new->p_mount->mnt_fs. - */ - if (IS_RDONLY(new)) - return -EROFS; - - /* - * Don't allow mount points to move. - */ - if (old->p_mount->mnt_root == old || - old->p_cover || - new->p_mount->mnt_root == new) - return -EBUSY; - - /* - * Make sure the old pnode can't be found in the ancestor chain - * for the new. If it can, they are trying to move into a subdirectory - * of the old. - */ - nxtpb = new->p_base; - do { - pb = nxtpb; - nxtpb = pb->pb_key.pbk_parent; - if (pb == old->p_base) - return -EINVAL; - } while (nxtpb); - - if (new->p_base->pb_ino) { - /* - * Existing entry. We're replacing the new. Make sure that's - * ok. - */ - if (S_ISDIR(new->p_base->pb_ino->i_stbuf.st_mode)) { - if (!S_ISDIR(old->p_base->pb_ino->i_stbuf.st_mode)) - return -EISDIR; - } else if (S_ISDIR(old->p_base->pb_ino->i_stbuf.st_mode)) - return -ENOTDIR; - } - - /* - * Give the op a try. - */ - err = PNOP_RENAME(old, new); - if (err) - return err; - /* - * Disconnect the old. - */ - _sysio_pb_disconnect(old->p_base); - /* - * Disconnect the new if positive. We want new lookups - * to find the just renamed entity. - */ - if (new->p_base->pb_ino) - _sysio_pb_disconnect(new->p_base); - return 0; -} int SYSIO_INTERFACE_NAME(link)(const char *oldpath, const char *newpath) { |
From: Lee W. <lw...@us...> - 2009-08-03 17:47:57
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13658 Modified Files: link.c Log Message: Removed redundant copy of _sysio_p_unlink, it's also in unlink.c How did this creep in? Did we move it and forget to delete the old? Anyway, it's gone now. Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -b -B -p -r1.17 -r1.18 --- link.c 28 Jan 2009 16:13:19 -0000 1.17 +++ link.c 3 Aug 2009 17:47:42 -0000 1.18 @@ -87,34 +87,6 @@ _sysio_p_link(struct pnode *old, struct } /* - * Perform unlink operation on some pnode. - */ -int -_sysio_p_unlink(struct pnode *pno) -{ - int err; - - if (IS_RDONLY(pno)) - return -EROFS; - if (!pno->p_base->pb_ino) - return -ENOENT; /* huh? */ - if (S_ISDIR(pno->p_base->pb_ino->i_stbuf.st_mode)) - return -EISDIR; - /* - * Call the FS implementation. - */ - err = PNOP_UNLINK(pno); - if (err) - return err; - /* - * Clean the namespace graphs to reflect the unlink. - */ - _sysio_i_undead(pno->p_base->pb_ino); - _sysio_pb_disconnect(pno->p_base); - return 0; -} - -/* * Perform symlink operation; oldpath to new. */ int |
From: Lee W. <lw...@us...> - 2009-07-28 17:00:16
|
Update of /cvsroot/libsysio/libsysio/misc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16096 Modified Files: fhi.c Log Message: fhi_unlink would unlink file that a symbolic link pointed to. Oops. Found and fixed by Jason Cope <co...@mc...>. Index: fhi.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/misc/fhi.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- fhi.c 25 Feb 2009 06:01:23 -0000 1.2 +++ fhi.c 28 Jul 2009 17:00:04 -0000 1.3 @@ -792,7 +792,7 @@ SYSIO_INTERFACE_NAME(fhi_unlink)(struct err = fhi_namei(where->fhida_dir, where->fhida_path, - 0, + ND_NOFOLLOW, &intent, &pno); if (err) |
From: Lee W. <lw...@us...> - 2009-06-24 15:38:56
|
Update of /cvsroot/libsysio/libsysio/dev In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28796 Modified Files: stddev.c Log Message: Both the read and write routines would abort on an unrecognized minor device number. That's, um, sub-optimal. They just return -ENODEV now, as they should have all along. Index: stddev.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/dev/stddev.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- stddev.c 11 Jul 2008 18:23:56 -0000 1.3 +++ stddev.c 24 Jun 2009 15:38:51 -0000 1.4 @@ -149,7 +149,8 @@ doread(void *cp, size_t n, _SYSIO_OFF_T cc = (ssize_t )n; break; default: - abort(); + cc = -ENODEV; + break; } return cc; } @@ -178,7 +179,8 @@ dowrite(void *cp __IS_UNUSED, cc = -ENOSPC; break; default: - abort(); + cc = -ENODEV; + break; } return cc; } |
From: Lee W. <lw...@us...> - 2009-05-05 17:01:02
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30476/drivers/incore Modified Files: fs_incore.c Log Message: Modified to reflect the new, required, perms_check operation. The generic dev returns -EBADF, of course. The incore and native drivers just use the default core policy routine. Index: fs_incore.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/incore/fs_incore.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -w -b -B -p -r1.37 -r1.38 --- fs_incore.c 10 Apr 2009 21:33:55 -0000 1.37 +++ fs_incore.c 5 May 2009 16:35:29 -0000 1.38 @@ -212,6 +212,7 @@ static struct inode_ops _sysio_incore_di #ifdef _HAVE_STATVFS _sysio_incore_inop_statvfs, #endif + _sysio_p_generic_perms_check, _sysio_incore_inop_gone }; @@ -268,6 +269,7 @@ static struct inode_ops _sysio_incore_fi #ifdef _HAVE_STATVFS _sysio_incore_inop_statvfs, #endif + _sysio_p_generic_perms_check, _sysio_incore_inop_gone }; @@ -298,6 +300,7 @@ static struct inode_ops _sysio_incore_de #ifdef _HAVE_STATVFS _sysio_incore_inop_statvfs, #endif + _sysio_p_generic_perms_check, _sysio_incore_inop_gone }; |
From: Lee W. <lw...@us...> - 2009-05-05 16:35:42
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30476/src Modified Files: dev.c Log Message: Modified to reflect the new, required, perms_check operation. The generic dev returns -EBADF, of course. The incore and native drivers just use the default core policy routine. Index: dev.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/dev.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- dev.c 14 Apr 2009 17:03:06 -0000 1.14 +++ dev.c 5 May 2009 16:35:29 -0000 1.15 @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -79,6 +79,7 @@ const struct inode_ops _sysio_nodev_ops #ifdef _HAVE_STATVFS _sysio_nodev_inop_statvfs, #endif + _sysio_nodev_inop_perms_check, _sysio_nodev_inop_gone }; |
From: Lee W. <lw...@us...> - 2009-05-05 16:35:39
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30476/include Modified Files: dev.h Log Message: Modified to reflect the new, required, perms_check operation. The generic dev returns -EBADF, of course. The incore and native drivers just use the default core policy routine. Index: dev.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/dev.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -b -B -p -r1.16 -r1.17 --- dev.h 14 Apr 2009 17:03:06 -0000 1.16 +++ dev.h 5 May 2009 16:35:29 -0000 1.17 @@ -142,6 +142,8 @@ extern const struct inode_ops _sysio_nod (int (*)(struct pnode *, \ struct intnl_statvfs *))_sysio_do_illop #endif +#define _sysio_nodev_inop_perms_check \ + (int (*)(struct pnode *, int amode, int effective))_sysio_do_ebadf #define _sysio_nodev_inop_gone \ (void (*)(struct inode *))_sysio_do_noop |
From: Lee W. <lw...@us...> - 2009-05-05 16:35:34
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30476/drivers/native Modified Files: fs_native.c Log Message: Modified to reflect the new, required, perms_check operation. The generic dev returns -EBADF, of course. The incore and native drivers just use the default core policy routine. Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -w -b -B -p -r1.71 -r1.72 --- fs_native.c 10 Apr 2009 21:33:55 -0000 1.71 +++ fs_native.c 5 May 2009 16:35:29 -0000 1.72 @@ -224,6 +224,7 @@ static struct inode_ops native_i_ops = { #ifdef _HAVE_STATVFS native_inop_statvfs, #endif + _sysio_p_generic_perms_check, native_inop_gone }; |
From: Lee W. <lw...@us...> - 2009-05-05 16:34:14
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30411/include Modified Files: inode.h Log Message: The inode supports a new operation, perms_check, so that we may have per-inode permssions checking. As well, a new routine, _sysio_p_generic_perms_check is available if your file system can just use the default policy for the core. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.53 retrieving revision 1.54 diff -u -w -b -B -p -r1.53 -r1.54 --- inode.h 10 Apr 2009 21:14:20 -0000 1.53 +++ inode.h 5 May 2009 16:34:01 -0000 1.54 @@ -125,6 +125,7 @@ struct inode_ops { #ifdef _HAVE_STATVFS int (*inop_statvfs)(struct pnode *pno, struct intnl_statvfs *buf); #endif + int (*inop_perms_check)(struct pnode *pno, int amode, int effective); void (*inop_gone)(struct inode *ino); }; @@ -631,6 +632,8 @@ struct pnode { #define PNOP_STATVFS(_pno, _buf) \ _PNOP_CALL((_pno), statvfs, (_pno), (_buf)) #endif +#define PNOP_PERMS_CHECK(_pno, _amode, _eff) \ + _PNOP_MKCALL((_pno), perms_check, (_pno), (_amode), (_eff)) /* * An intent record allows callers of namei and lookup to pass some information @@ -876,3 +879,6 @@ extern int _sysio_p_awrite(struct pnode struct ioctx **ioctxp); extern int _sysio_mkdir(struct pnode *where, mode_t mode); extern int _sysio_mknod(struct pnode *where, mode_t mode, dev_t dev); +extern int _sysio_p_generic_perms_check(struct pnode *pno, + int amode, + int effective); |
From: Lee W. <lw...@us...> - 2009-05-05 16:30:46
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29952/src Modified Files: access.c Log Message: Modified to allow the package user to specify alternate routines for the acquisition of credentials and implementation of permission check policy. In order to arrange the acquisition of alternate credentials, the pointers to _sysio_get_credentials and _sysio_put_credentials should be overwritten. Your get_credentials routine should set the passed pointer to a credentials structure with the uid and gids set with the real values, if the formal called 'effective', is zero or the effective values if non-zero. Your put_credentials routine is called when the core no longer requires your credentials. If you do not need a release routine, you may set _sysio_put_credentials to NULL. In order to arrange the use of an alternate permission check the pointer to _sysio_check_permission should be overwritten. If any of these pointers are overwritten by the user, it must be done prior to calling _sysio_init and may not be reset thereafter. Index: access.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/access.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- access.c 17 Jun 2008 17:18:57 -0000 1.19 +++ access.c 5 May 2009 16:30:18 -0000 1.20 @@ -41,6 +41,7 @@ * le...@sa... */ +#include <stddef.h> /* ptrdiff_t */ #include <stdlib.h> #include <errno.h> #include <assert.h> @@ -56,18 +57,32 @@ #include "inode.h" #include "sysio-symbols.h" -/* - * Use a persistent buffer for gids. No, not a cache. We just want to - * avoid calling malloc over, and over, and... - */ -static gid_t *gids = NULL; -static int gidslen = 0; +static int get_credentials(struct creds **crp, int effective); +static void put_credentials(struct creds *cr); +static int check_permission(struct pnode *pno, struct creds *cr, int amode); + +/* + * If the application will be managing credentials externally, these + * are the interface. Before calling this librariy's initialization + * routines, reset them to your own. + */ +int (*_sysio_get_credentials)(struct creds **, int) = + get_credentials; +void (*_sysio_put_credentials)(struct creds *) = + put_credentials; +int (*_sysio_check_permission)(struct pnode *, struct creds *, int) = + check_permission; + +static struct user_credentials { + struct creds creds; + unsigned refs; +} *_current_ucreds = NULL; /* * Check given access type on given inode. */ -int -_sysio_check_permission(struct pnode *pno, struct creds *crp, int amode) +static int +check_permission(struct pnode *pno, struct creds *crp, int amode) { mode_t mask; struct inode *ino; @@ -160,27 +175,18 @@ _sysio_check_permission(struct pnode *pn } /* - * Cache groups. + * (Re)fill credentials */ static int -_sysio_ldgroups(gid_t gid0, gid_t **gidsp, int *gidslenp) +ldgroups(gid_t gid0, gid_t **gidsp, int *gidslenp) { int n, i; void *p; n = *gidslenp; - if (n < 8) { - *gidsp = NULL; + if (n < 8) n = 8; - } for (;;) { - /* - * This is far more expensive than I would like. Each time - * called it has to go to some length to acquire the - * current uid and groups membership. We can't just cache - * the result, either. The caller could have altered something - * asynchronously. Wish we had easy access to this info. - */ if (n > *gidslenp) { p = realloc(*gidsp, (size_t )n * sizeof(gid_t)); if (!p) @@ -211,45 +217,133 @@ _sysio_ldgroups(gid_t gid0, gid_t **gids * Get current credentials. */ static int -_sysio_ldcreds(uid_t uid, gid_t gid, struct creds *crp) +ldcreds(uid_t uid, gid_t gid, struct creds *cr) { int n; - n = _sysio_ldgroups(gid, &gids, &gidslen); + n = ldgroups(gid, &cr->creds_gids, &cr->creds_ngids); if (n < 0) return n; - crp->creds_uid = uid; - crp->creds_gids = gids; - crp->creds_ngids = n; + cr->creds_ngids = n; + cr->creds_uid = uid; return 0; } -#if 0 static int -_sysio_getcreds(struct creds *crp) +get_credentials(struct creds **crp, int effective) { + int err; + uid_t uid; + gid_t gid; - return _sysio_ldcreds(getuid(), getgid(), crp); + /* + * This is not a particularly efficient implementation. We + * don't expect it to ever be used in a thread-safe environment + * though, so expect no problems because of it. + */ + err = 0; + mutex_lock(&_sysio_biglock); + do { + if (!_current_ucreds || _current_ucreds->refs) { + _current_ucreds = + malloc(sizeof(struct user_credentials)); + if (!_current_ucreds) { + err = -ENOMEM; + break; + } + _current_ucreds->creds.creds_uid = -1; + _current_ucreds->creds.creds_gids = NULL; + _current_ucreds->creds.creds_ngids = 0; + _current_ucreds->refs = 0; + } + if (effective) { + uid = geteuid(); + gid = getegid(); + } else { + uid = getuid(); + gid = getgid(); + } + err = + ldcreds(uid, + gid, + &_current_ucreds->creds); + if (err) + break; + _current_ucreds->refs++; + } while (0); + mutex_unlock(&_sysio_biglock); + if (err) + return err; + *crp = &_current_ucreds->creds; + return 0; +} + +static void +release_ucreds(struct user_credentials *ucr) +{ + + free(ucr->creds.creds_gids); + free(ucr); +} + +static void +put_credentials(struct creds *cr) +{ + struct user_credentials *ucr; + + mutex_lock(&_sysio_biglock); + do { + ucr = CONTAINER(user_credentials, creds, cr); + assert(ucr->refs); + if (--ucr->refs || ucr == _current_ucreds) { + ucr = NULL; + break; + } + } while (0); + mutex_unlock(&_sysio_biglock); + if (ucr) + release_ucreds(ucr); } -#endif /* - * Determine if a given access is permitted to a given file. + * Common permission check. */ int -_sysio_permitted(struct pnode *pno, int amode) +_sysio_p_generic_perms_check(struct pnode *pno, int amode, int effective) { - struct creds cr; int err; + struct creds *cr; - err = _sysio_ldcreds(geteuid(), getegid(), &cr); - if (err < 0) - return err; - err = _sysio_check_permission(pno, &cr, amode); + do { + if ((err = (*_sysio_get_credentials)(&cr, effective))) { + cr = NULL; + break; + } + err = (*_sysio_check_permission)(pno, cr, amode); + } while (0); + if (cr) + (*_sysio_put_credentials)(cr); return err; } +static int +permitted(struct pnode *pno, int amode, int effective) +{ + + return PNOP_PERMS_CHECK(pno, amode, effective); +} + +/* + * Determine if a given access is permitted to a given file. + */ +int +_sysio_permitted(struct pnode *pno, int amode) +{ + + return permitted(pno, amode, 0); +} + #ifdef ZERO_SUM_MEMORY /* * Clean up persistent resource on shutdown. @@ -258,10 +352,10 @@ void _sysio_access_shutdown() { - if (gids) - free(gids); - gids = NULL; - gidslen = 0; + if (_current_ucreds) { + release_ucreds(_current_ucreds); + _current_ucreds = NULL; + } } #endif @@ -271,22 +365,21 @@ SYSIO_INTERFACE_NAME(access)(const char struct intent intent; int err; struct pnode *pno; - struct creds cr; SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER(access, "%s%d", path, amode); + do { INTENT_INIT(&intent, INT_GETATTR, NULL, NULL); err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno); - if (err) - SYSIO_INTERFACE_RETURN(-1, err, access, "%d", 0); - err = _sysio_ldcreds(geteuid(), getegid(), &cr); - if (err < 0) - goto out; - err = - _sysio_check_permission(pno, &cr, amode); -out: + if (err) { + pno = NULL; + break; + } + err = permitted(pno, amode, 1); + } while (0); + if (pno) P_PUT(pno); SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, access, "%d", 0); } |
From: Lee W. <lw...@us...> - 2009-05-05 16:30:35
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29952/include Modified Files: creds.h Log Message: Modified to allow the package user to specify alternate routines for the acquisition of credentials and implementation of permission check policy. In order to arrange the acquisition of alternate credentials, the pointers to _sysio_get_credentials and _sysio_put_credentials should be overwritten. Your get_credentials routine should set the passed pointer to a credentials structure with the uid and gids set with the real values, if the formal called 'effective', is zero or the effective values if non-zero. Your put_credentials routine is called when the core no longer requires your credentials. If you do not need a release routine, you may set _sysio_put_credentials to NULL. In order to arrange the use of an alternate permission check the pointer to _sysio_check_permission should be overwritten. If any of these pointers are overwritten by the user, it must be done prior to calling _sysio_init and may not be reset thereafter. Index: creds.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/creds.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- creds.h 20 Nov 2007 17:31:29 -0000 1.3 +++ creds.h 5 May 2009 16:30:18 -0000 1.4 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2009 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -71,4 +71,10 @@ struct creds { #else (0) #endif + +struct pnode; + +extern int (*_sysio_get_credentials)(struct creds **, int); +extern void (*_sysio_put_credentials)(struct creds *); +extern int (*_sysio_check_permission)(struct pnode *, struct creds *, int); #endif |
From: Lee W. <lw...@us...> - 2009-04-17 14:54:53
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9079/include Modified Files: tree.h Log Message: Altered the, so far unused by anyone, enumerate routine to take an extra argument and pass same to the pre, in, and post callbacks. This, to allow the caller to pass and maintain context. Also, the enumerate routine has been re-implemented with a de-recursed version. Strange that has been done here first since it's badly needed in other parts of the core and this routine is used nowhere. Obviously, these changes are not well tested. Index: tree.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/tree.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- tree.h 19 Apr 2008 19:09:14 -0000 1.2 +++ tree.h 17 Apr 2009 14:54:35 -0000 1.3 @@ -68,8 +68,9 @@ extern struct tree_node *_sysio_tree_del struct tree_node **rootp, int (*compar)(const void *, const void *)); -extern void _sysio_tree_enumerate(const struct tree_node *tn, - void (*pre)(const struct tree_node *), - void (*in)(const struct tree_node *), - void (*post)(const struct tree_node *)); +extern int _sysio_tree_enumerate(const struct tree_node *tn, + int (*pre)(const struct tree_node *, void *), + int (*in)(const struct tree_node *, void *), + int (*post)(const struct tree_node *, void *), + void *); #endif /* !defined(_TREE_H) */ |
From: Lee W. <lw...@us...> - 2009-04-17 14:54:41
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9079/src Modified Files: tree.c Log Message: Altered the, so far unused by anyone, enumerate routine to take an extra argument and pass same to the pre, in, and post callbacks. This, to allow the caller to pass and maintain context. Also, the enumerate routine has been re-implemented with a de-recursed version. Strange that has been done here first since it's badly needed in other parts of the core and this routine is used nowhere. Obviously, these changes are not well tested. Index: tree.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/tree.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- tree.c 19 Apr 2008 19:09:14 -0000 1.2 +++ tree.c 17 Apr 2009 14:54:35 -0000 1.3 @@ -42,6 +42,7 @@ */ #include <stdlib.h> +#include <errno.h> #include "tree.h" @@ -179,21 +180,114 @@ _sysio_tree_delete(const void *key, * Enumerate the passed tree calling the pre, in, and post routines at each * node if they aren't NULL. */ -void +int _sysio_tree_enumerate(const struct tree_node *tn, - void (*pre)(const struct tree_node *), - void (*in)(const struct tree_node *), - void (*post)(const struct tree_node *)) + int (*pre)(const struct tree_node *, void *), + int (*in)(const struct tree_node *, void *), + int (*post)(const struct tree_node *, void *), + void *data) { + struct stk_entry { + enum { PRE, IN, POST } state; + union { + const struct tree_node *tn; + struct stk_entry *next; + } u; + } *_free, *_list, *_tmp, *_seg_end, *top; + int result; + +#define _NPERSEG 20 + +#define _GET_FREE \ + (_free \ + ? ((_tmp = _free), \ + (_free = _tmp->u.next), \ + (_tmp->u.next = _list), \ + (_list = _tmp)) \ + : ((_tmp = malloc(_NPERSEG * sizeof(struct stk_entry))) \ + ? ((_tmp->u.next = _list), \ + (_list = _tmp)) \ + : NULL)) + +#define _PUSH \ + ((++top < _seg_end) \ + ? 0 \ + : (_GET_FREE \ + ? ((_seg_end = _list + _NPERSEG), \ + (top = _list + 1), \ + 0) \ + : -ENOMEM)) +#define _POP \ + ((--top > _list) \ + ? 0 \ + : ((_tmp = _list) \ + ? ((_list = _list->u.next), \ + (top = (_seg_end = _list + _NPERSEG) - 1), \ + (_tmp->u.next = _free), \ + (_free = _tmp->u.next), \ + 0) \ + : 1)) + + top = _free = _list = _seg_end = NULL; + result = ((++top < _seg_end) + ? 0 + : (_GET_FREE + ? ((_seg_end = _list + _NPERSEG), + (top = _list + 1), + 0) + : -ENOMEM)); + if (!result) { + top->state = PRE; + top->u.tn = tn; + } + while (!result && _POP) { + tn = top->u.tn; + switch (top->state) { + case PRE: + if (pre && (result = (*pre)(tn, data))) + break; + top->state = IN; + if (tn->tn_left) { + if ((result = _PUSH)) + break; + top->state = PRE; + top->u.tn = tn->tn_left; + break; + } + case IN: + if (in && (result = (*in)(tn, data))) + break; + top->state = POST; + if (tn->tn_right) { + if ((result = _PUSH)) + break; + top->state = PRE; + top->u.tn = tn->tn_right; + break; + } + case POST: + if (post && (result = (*post)(tn, data))) + break; + break; + default: + result = -EINVAL; + } + } - if (pre) - (*pre)(tn); - if (tn->tn_left) - _sysio_tree_enumerate(tn->tn_left, pre, in, post); - if (in) - (*in)(tn); - if (tn->tn_right) - _sysio_tree_enumerate(tn->tn_right, pre, in, post); - if (post) - (*post)(tn); +#undef _POP +#undef _PUSH +#undef _GET_FREE +#undef _NPERSEG + + while (_list) { + _tmp = _list; + _list = _list->u.next; + free(_tmp); + } + while (_free) { + _tmp = _free; + _free = _free->u.next; + free(_tmp); + } + return result; } |
From: Lee W. <lw...@us...> - 2009-04-14 17:03:20
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25712/src Modified Files: dev.c Log Message: Changed the names of _sysio_nodev_filldirentries and _sysio_nodev_filldirentries2 to _sysio_nodev_inop_filldirentries and _sysio_nodev_filldirentries2, respectively. For consistencies sake. Index: dev.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/dev.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- dev.c 10 Apr 2009 21:31:48 -0000 1.13 +++ dev.c 14 Apr 2009 17:03:06 -0000 1.14 @@ -56,8 +56,8 @@ const struct inode_ops _sysio_nodev_ops _sysio_nodev_inop_lookup, _sysio_nodev_inop_getattr, _sysio_nodev_inop_setattr, - _sysio_nodev_filldirentries, - _sysio_nodev_filldirentries2, + _sysio_nodev_inop_filldirentries, + _sysio_nodev_inop_filldirentries2, _sysio_nodev_inop_mkdir, _sysio_nodev_inop_rmdir, _sysio_nodev_inop_symlink, |
From: Lee W. <lw...@us...> - 2009-04-14 17:03:20
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25712/d Modified Files: dev.h Log Message: Changed the names of _sysio_nodev_filldirentries and _sysio_nodev_filldirentries2 to _sysio_nodev_inop_filldirentries and _sysio_nodev_filldirentries2, respectively. For consistencies sake. Index: dev.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/dev.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -b -B -p -r1.15 -r1.16 --- dev.h 10 Apr 2009 21:32:28 -0000 1.15 +++ dev.h 14 Apr 2009 17:03:06 -0000 1.16 @@ -78,12 +78,12 @@ extern const struct inode_ops _sysio_nod (int (*)(struct pnode *, \ unsigned , \ struct intnl_stat *))_sysio_do_ebadf -#define _sysio_nodev_filldirentries \ +#define _sysio_nodev_inop_filldirentries \ (ssize_t (*)(struct pnode *, \ _SYSIO_OFF_T *, \ char *, \ size_t))_sysio_do_illop -#define _sysio_nodev_filldirentries2 \ +#define _sysio_nodev_inop_filldirentries2 \ (int (*)(struct pnode *, \ _SYSIO_OFF_T *, \ filldir_t, \ |
From: Lee W. <lw...@us...> - 2009-04-10 21:34:08
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20883/drivers/incore Modified Files: fs_incore.c Log Message: Reflect new filldirentries2 operation. Does not yet make use of it, relying on compatibility with old filldirentries. Index: fs_incore.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/incore/fs_incore.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -w -b -B -p -r1.36 -r1.37 --- fs_incore.c 6 Dec 2008 23:28:55 -0000 1.36 +++ fs_incore.c 10 Apr 2009 21:33:55 -0000 1.37 @@ -190,6 +190,7 @@ static struct inode_ops _sysio_incore_di _sysio_incore_inop_getattr, _sysio_incore_inop_setattr, _sysio_incore_dirop_filldirentries, + NULL, _sysio_incore_dirop_mkdir, _sysio_incore_dirop_rmdir, _sysio_incore_dirop_symlink, @@ -245,6 +246,7 @@ static struct inode_ops _sysio_incore_fi _sysio_incore_inop_getattr, _sysio_incore_inop_setattr, _sysio_incore_filop_filldirentries, + NULL, _sysio_incore_filop_mkdir, _sysio_incore_filop_rmdir, _sysio_incore_filop_symlink, @@ -274,6 +276,7 @@ static struct inode_ops _sysio_incore_de _sysio_incore_inop_getattr, _sysio_incore_inop_setattr, _sysio_incore_filop_filldirentries, + NULL, _sysio_incore_filop_mkdir, _sysio_incore_filop_rmdir, _sysio_incore_filop_symlink, |
From: Lee W. <lw...@us...> - 2009-04-10 21:34:02
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20883/drivers/native Modified Files: fs_native.c Log Message: Reflect new filldirentries2 operation. Does not yet make use of it, relying on compatibility with old filldirentries. Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -w -b -B -p -r1.70 -r1.71 --- fs_native.c 26 Feb 2009 14:57:03 -0000 1.70 +++ fs_native.c 10 Apr 2009 21:33:55 -0000 1.71 @@ -202,6 +202,7 @@ static struct inode_ops native_i_ops = { native_inop_getattr, native_inop_setattr, native_filldirentries, + NULL, native_inop_mkdir, native_inop_rmdir, native_inop_symlink, |