X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=etc%2Fafpd%2Fquota.c;h=f4d6d273a5e6fca2b984cf290d62830b65b39b39;hp=2a12ca5e73e9932a6167e78cd3257f2a99616f06;hb=1b20936596f89b2706f1122ca2fabad6ffe00c98;hpb=edefad2f0703ed2f6a21025d615600ed18c83d18 diff --git a/etc/afpd/quota.c b/etc/afpd/quota.c index 2a12ca5e..f4d6d273 100644 --- a/etc/afpd/quota.c +++ b/etc/afpd/quota.c @@ -1,5 +1,5 @@ /* - * $Id: quota.c,v 1.32 2009-10-14 02:24:05 didg Exp $ + * $Id: quota.c,v 1.32.2.1 2010-01-02 10:22:32 franklahm Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -296,7 +296,7 @@ mountp( char *file, int *nfs) dev_t devno; static struct mnttab mnt; - if ( stat( file, &sb ) < 0 ) { + if ( lstat( file, &sb ) < 0 ) { return( NULL ); } devno = sb.st_dev; @@ -307,14 +307,14 @@ mountp( char *file, int *nfs) while ( getmntent( mtab, &mnt ) == 0 ) { /* local fs */ - if ( (stat( mnt.mnt_special, &sb ) == 0) && (devno == sb.st_rdev)) { + if ( (lstat( mnt.mnt_special, &sb ) == 0) && (devno == sb.st_rdev)) { fclose( mtab ); return mnt.mnt_mountp; } /* check for nfs. we probably should use * strcmp(mnt.mnt_fstype, MNTTYPE_NFS), but that's not as fast. */ - if ((stat(mnt.mnt_mountp, &sb) == 0) && (devno == sb.st_dev) && + if ((lstat(mnt.mnt_mountp, &sb) == 0) && (devno == sb.st_dev) && strchr(mnt.mnt_special, ':')) { *nfs = 1; fclose( mtab ); @@ -384,7 +384,7 @@ special(char *file, int *nfs) struct mntent *mnt; int found=0; - if ( stat( file, &sb ) < 0 ) { + if ( lstat( file, &sb ) < 0 ) { return( NULL ); } devno = sb.st_dev; @@ -395,14 +395,14 @@ special(char *file, int *nfs) while (( mnt = getmntent( mtab )) != NULL ) { /* check for local fs */ - if ( (stat( mnt->mnt_fsname, &sb ) == 0) && devno == sb.st_rdev) { + if ( (lstat( mnt->mnt_fsname, &sb ) == 0) && devno == sb.st_rdev) { found = 1; break; } /* check for an nfs mount entry. the alternative is to use * strcmp(mnt->mnt_type, MNTTYPE_NFS) instead of the strchr. */ - if ((stat(mnt->mnt_dir, &sb) == 0) && (devno == sb.st_dev) && + if ((lstat(mnt->mnt_dir, &sb) == 0) && (devno == sb.st_dev) && strchr(mnt->mnt_fsname, ':')) { *nfs = 1; found = 1;