Walt is correct on this. The serialization function should be implemented in system code and currently it is not. I wonder if there is a third party product that intercept the allocation/Open types and serialize on directories and files.
ITschak On Sun, Jul 4, 2010 at 4:54 PM, Walt Farrell <wfarr...@us.ibm.com> wrote: > On Fri, 2 Jul 2010 09:32:01 -0400, Thomas David Rivers <riv...@dignus.com> > wrote: > > >I believe the advisory locking is very "old hat" (i.e. > >BSD 2, SYSV, etc...), and the more modern/proper way > >to get a file lock is to use: > > > > fcntl(fd, F_GETLK, ...); > > > > fcntl(fd, F_SETLK, ...); > > > >This is not an 'advisory lock' like flock(), but a lock > >in the operating/file system. > > > > Does UNIX or the file system automatically issue that fcntl for the program > when it accesses a file? If not, it is "advisory" in the same sense that > flock is, because if the program does not issue the fcntl, it has no > serialization. > > On the other hand, ENQ/DEQ is also advisory. The program accessing the > resource needs to issue the appropriate ENQ and DEQ in order to maintain > proper serialization. The question then becomes "what is the program?" > > For the case of the SYSDSN ENQ, the relevant program is in most cases > Allocation, not the program that's going to use the data set, and the > specific ENQ is based on the allocation DISP parameter. The SYSDSN ENQ is > still advisory as far as Allocation is concerned, but out of the control of > most data-accessing programs and thus mandatory from their perspective. > > If you consider ENQs such as the one ISPF created to protect updating > members of a partitioned data set, and that some other programs also use, > that ENQ is more obviously advisory. > > -- > Walt Farrell > IBM STSM, z/OS Security Design > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html