X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Fafs.c;h=f11d77eb22995a400ff43247cf7ddd4441babdbb;hb=be9876310c25cc3faaa72db9b12064a96a1caa70;hp=2c30865b0697de36681d2c329b5c94fe4c8c543d;hpb=ecfc96169ab669b578e53fa8e13592934fe37788;p=netatalk.git diff --git a/etc/afpd/afs.c b/etc/afpd/afs.c index 2c30865b..f11d77eb 100644 --- a/etc/afpd/afs.c +++ b/etc/afpd/afs.c @@ -1,5 +1,5 @@ /* - * $Id: afs.c,v 1.17 2005-04-28 20:49:40 bfernhomberg Exp $ + * $Id: afs.c,v 1.18 2009-10-15 10:43:13 didg Exp $ * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ @@ -29,10 +29,7 @@ #include "misc.h" #include "unix.h" -int afs_getvolspace( vol, bfree, btotal, bsize ) -struct vol *vol; -VolSpace *bfree, *btotal; -u_int32_t *bsize; +int afs_getvolspace(struct vol *vol, VolSpace *bfree, VolSpace *btotal, uint32_t *bsize) { struct ViceIoctl vi; struct VolumeStatus *vs; @@ -75,17 +72,14 @@ u_int32_t *bsize; return( AFP_OK ); } -int afp_getdiracl(obj, ibuf, ibuflen, rbuf, rbuflen ) -AFPObj *obj; -char *ibuf, *rbuf; -int ibuflen, *rbuflen; +int afp_getdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) { struct ViceIoctl vi; struct vol *vol; struct dir *dir; struct path *path; - u_int32_t did; - u_int16_t vid; + uint32_t did; + uint16_t vid; ibuf += 2; memcpy( &vid, ibuf, sizeof( vid )); @@ -132,11 +126,7 @@ int ibuflen, *rbuflen; #undef accessmode #endif -void afsmode( path, ma, dir, st ) -char *path; -struct maccess *ma; -struct dir *dir; -struct stat *st; +void afsmode(const struct volume *vol, char *path, struct maccess *ma, struct dir *dir, struct stat *st) { struct ViceIoctl vi; char buf[ 1024 ]; @@ -156,7 +146,7 @@ struct stat *st; return; } - accessmode( path, ma, dir, st ); + accessmode(vol, path, ma, dir, st ); return; } @@ -165,18 +155,15 @@ extern struct dir *curdir; /* * cmd | 0 | vid | did | pathtype | pathname | 0 | acl */ -int afp_setdiracl(obj, ibuf, ibuflen, rbuf, rbuflen ) -AFPObj *obj; -char *ibuf, *rbuf; -int ibuflen, *rbuflen; +int afp_setdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) { struct ViceIoctl vi; struct vol *vol; struct dir *dir; char *iend; struct path *path; - u_int32_t did; - u_int16_t vid; + uint32_t did; + uint16_t vid; *rbuflen = 0; iend = ibuf + ibuflen; @@ -235,16 +222,13 @@ int ibuflen, *rbuflen; extern C_Block seskey; extern Key_schedule seskeysched; -int afp_afschangepw(obj, ibuf, ibuflen, rbuf, rbuflen ) -AFPObj *obj; -char *ibuf, *rbuf; -int ibuflen, *rbuflen; +int afp_afschangepw(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) { char name[ MAXKTCNAMELEN ], instance[ MAXKTCNAMELEN ]; char realm[ MAXKTCREALMLEN ]; char oldpw[ 9 ], newpw[ 9 ]; int len, rc; - u_int16_t clen; + uint16_t clen; struct ktc_encryptionKey oldkey, newkey; struct ktc_token adtok; struct ubik_client *conn;