From 7afd82623d0108942800b5fc5d30419602d60e65 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Mon, 1 Oct 2001 18:35:50 +0000 Subject: [PATCH] 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 --- src/viced/afsfileprocs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; -- 2.39.5