[8760] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: rsaix 7.3M: ftp: .netrc protection problem

daemon@ATHENA.MIT.EDU (lwvanels@Athena.MIT.EDU)
Fri Dec 13 21:52:55 1991

From: lwvanels@Athena.MIT.EDU
Date: Fri, 13 Dec 91 21:52:44 -0500
To: Calvin Clark <ckclark@Athena.MIT.EDU>
Cc: bugs@Athena.MIT.EDU
In-Reply-To: [8758]
Reply-To: lwvanels@mit.edu

This looks like a bug in the vn_access syscall (which is called by the
accessx subroutine, which ftp is using to check the accessablity of .netrc)
The following program demonstrates this:

/*  foo.c */
#include <stdio.h>
#include <sys/access.h>

main(argc,argv)
     int argc;
     char **argv;
{
  if (accessx(argv[1], R_ACC, ACC_OTHERS) == 0)
    printf("Read access\n");
  if (accessx(argv[1], W_ACC, ACC_OTHERS) == 0)
    printf("Write access\n");
  if (accessx(argv[1], X_ACC, ACC_OTHERS) == 0)
    printf("Execute access\n");
}




godtree /tmp)cc -o foo foo.c
godtree /tmp)touch a
godtree /tmp)ls -l a
-r--------   1 lwvanels mit            0 Dec 13 21:49 a
godtree /tmp)./foo a
godtree /tmp)fs la ~/fascist/
Access list for /mit/lwvanels/fascist/ is
Normal rights:
  lwvanels rlidwka
godtree /tmp)touch ~/fascist/a
godtree /tmp)ls -l ~/fascist/a
-r--------   1 lwvanels system         0 Dec 13 16:18 /mit/lwvanels/fascist/a
godtree /tmp)./foo ~/fascist/a
Read access
godtree /tmp)

home help back first fref pref prev next nref lref last post