home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / novell / 9640 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.0 KB  |  62 lines

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!emory!ogicse!psgrain!hippo!shrike.und.ac.za!casper.cs.uct.ac.za!smarquar
  2. From: smarquar@casper.cs.uct.ac.za (S C Marquard)
  3. Newsgroups: comp.sys.novell
  4. Subject: Opening files in read-only, deny read&write mode
  5. Summary: Opening a file in RO, deny R&W mode denies other users access
  6. Keywords: file-sharing
  7. Message-ID: <Bxyo8x.E4G@casper.cs.uct.ac.za>
  8. Date: 19 Nov 92 11:36:33 GMT
  9. Article-I.D.: casper.Bxyo8x.E4G
  10. Organization: Computer Science Department, University of Cape Town
  11. Lines: 49
  12.  
  13. I tried the following on a NW2.2 network:
  14.  
  15. A user with only [RF] rights in SYS:LOGIN and SYS:PUBLIC runs a program
  16. which opens a file in read-only, deny read&write mode. As one might
  17. expect, any other user is then prevented from reading that file, no matter
  18. what their rights are.
  19.  
  20. Now this is all very well, but what happens when a user (ANY user)
  21. opens, say SYS:LOGIN\LOGIN.EXE, and doesn't close it again. All other
  22. users are then prevented from logging in. The same could be done to 
  23. SYSCON, MAP, you name it...
  24.  
  25. Is there any way of preventing this, or are all networks vulnerable to
  26. the first obstructionist user who arrives with a program which will
  27. open a file in deny read&write mode and not close it again?
  28.  
  29. I used the following program to test this (compiled with Borland C++ v3.0):
  30.  #include <stdlib.h>
  31.  #include <stdio.h>
  32.  #include <conio.h>
  33.  #include <share.h>
  34.  
  35.  void main(int argc, char* argv[])
  36.  {
  37.    printf("Opening %s in mode %s / %i\n",argv[1], argv[2], atoi(argv[3]));
  38.    FILE *fp= _fsopen(argv[1], argv[2], atoi(argv[3]));
  39.  
  40.    if (fp!=NULL)
  41.       {
  42.        printf("Open...");
  43.        getch();
  44.        fclose(fp);
  45.        printf("closed\n");
  46.       }
  47.  
  48.    return;
  49.  }
  50.  
  51. GRAB F:LOGIN.EXE rb 16
  52. is enough to cripple things, and can be done by any user.
  53.  
  54. Any solutions?
  55.  
  56. Stephen Marquard
  57. University of Cape Town
  58. -------------------------------------------------------------
  59. Internet: smarquar@casper.cs.uct.ac.za
  60. Fidonet: Stephen.Marquard@p3.f120.n7102.z5.fidonet.org
  61. -------------------------------------------------------------
  62.