X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2FOBSD%2Fosi_misc.c;h=138f8e0c428d69ab43fcee9e1c57b2188fbfa699;hp=fa568bc3f52171fabcf892301d4263537cabaf8a;hb=0bc7169a9c7abf2dc1b2a13cb97bf366a3174649;hpb=c9139f0c54e6e082ce4e54ed5359581dd08bab72 diff --git a/src/afs/OBSD/osi_misc.c b/src/afs/OBSD/osi_misc.c index fa568bc..138f8e0 100644 --- a/src/afs/OBSD/osi_misc.c +++ b/src/afs/OBSD/osi_misc.c @@ -1,3 +1,39 @@ +/* + * osi_misc.c + * + * $Id$ + */ + +/* +copyright 2002 +the regents of the university of michigan +all rights reserved + +permission is granted to use, copy, create derivative works +and redistribute this software and such derivative works +for any purpose, so long as the name of the university of +michigan is not used in any advertising or publicity +pertaining to the use or distribution of this software +without specific, written prior authorization. if the +above copyright notice or any other identification of the +university of michigan is included in any copy of any +portion of this software, then the disclaimer below must +also be included. + +this software is provided as is, without representation +from the university of michigan as to its fitness for any +purpose, and without warranty by the university of +michigan of any kind, either express or implied, including +without limitation the implied warranties of +merchantability and fitness for a particular purpose. the +regents of the university of michigan shall not be liable +for any damages, including special, indirect, incidental, or +consequential damages, with respect to any claim arising +out of or in connection with the use of the software, even +if it has been or is hereafter advised of the possibility of +such damages. +*/ + /* * Copyright 2000, International Business Machines Corporation and others. * All Rights Reserved. @@ -7,18 +43,11 @@ * directory or online at http://www.openafs.org/dl/license10.html */ -/* - * osi_misc.c - * - * OpenBSD version of afs_osi_suser() by Jim Rees. - * See osi_machdep.h for afs_suser macro. It simply calls afs_osi_suser() - * with the creds of the current process. - */ - #include #include "afs/param.h" -RCSID("$Header$"); +RCSID + ("$Header$"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afs/afsincludes.h" /* Afs-based standard headers */ @@ -29,10 +58,31 @@ RCSID("$Header$"); * Note that it must NOT set errno. */ +/* + * OpenBSD version of afs_osi_suser() by Jim Rees. + * See osi_machdep.h for afs_suser macro. It simply calls afs_osi_suser() + * with the creds of the current process. + */ + int afs_osi_suser(void *credp) { - return (suser((struct ucred *) credp, &curproc->p_acflag) ? 0 : 1); + return (suser((struct ucred *)credp, &curproc->p_acflag) ? 0 : 1); +} + +void * +afs_nbsd_Alloc(size_t asize) +{ + void *p; + + MALLOC(p, void *, asize, M_AFSGENERIC, M_WAITOK); + return p; +} + +void +afs_nbsd_Free(void *p, size_t asize) +{ + FREE(p, M_AFSGENERIC); } int