[Libsysio-commit] HEAD: libsysio/include creds.h
Brought to you by:
lward
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 |