From: Nickolai Zeldovich Date: Mon, 1 Oct 2001 18:35:50 +0000 (+0000) Subject: require-administer-permission-for-mount-point-creation-harder-20010926 X-Git-Tag: openafs-devel-1_3_0~268 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7afd82623d0108942800b5fc5d30419602d60e65;p=packages%2Fo%2Fopenafs.git require-administer-permission-for-mount-point-creation-harder-20010926 make sure a mount point isn't being created if the user isn't allowed to do that --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index db734a366..69b880bf1 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -2536,15 +2536,15 @@ SAFSS_Symlink (tcon, DirFid, Name, LinkContents, InStatus, OutFid, OutFidStatus, } /* - * If we're creating a mount point (owner mode bits sans x bit), we must - * have administer access to the directory, too. Always allow sysadmins + * If we're creating a mount point (any x bits clear), we must have + * administer access to the directory, too. Always allow sysadmins * to do this. */ - if ((InStatus->Mask & AFS_SETMODE) && !(InStatus->UnixModeBits & 0100)) { + if ((InStatus->Mask & AFS_SETMODE) && !(InStatus->UnixModeBits & 0111)) { /* - * We have a symlink, 'cause we're trying to set the Unix mode bits - * to something without the owner x bits (default mode bits if - * AFS_SETMODE is false is 0777) + * We have a mountpoint, 'cause we're trying to set the Unix mode + * bits to something with some x bits missing (default mode bits + * if AFS_SETMODE is false is 0777) */ if (VanillaUser(client) && !(rights & PRSFS_ADMINISTER)) { errorCode = EACCES;