* C file access in VMS
@ 1991-07-18 15:31 Murray S. Kucherawy
1991-07-19 13:30 ` Lloyd Kremer
0 siblings, 1 reply; 2+ messages in thread
From: Murray S. Kucherawy @ 1991-07-18 15:31 UTC (permalink / raw)
Under VMS V5.4-1, we're auditing CONTROL access failures on files, and
the code below is causing these alarms. Can anyone figure out why
and possibly suggest a fix?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FILE *open_file_for_read( file_name)
char file_name[SIZE_OF_FILE_NAME];
{
FILE *p_file;
if ( (p_file = fopen( file_name, "r")) == NULL)
{
printf("\n\nFailed to open file %s for reading.\n\n", file_name);
exit(1);
}
else return( p_file);
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Thanks in advance...
=============================== Murray S. Kucherawy ==========================
Motorola Canada, Ltd. Private Systems Division, Toronto [on work term]
University of Waterloo, Ontario, Canada 2B Math/Computer Science
Internet: murray@motto.UUCP (work) mskucherawy@watmath.UWaterloo.ca (UW)
UUCP: uunet!utai!lsuc!motto!murray uunet!watmath!mskucherawy
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: C file access in VMS
1991-07-18 15:31 C file access in VMS Murray S. Kucherawy
@ 1991-07-19 13:30 ` Lloyd Kremer
0 siblings, 0 replies; 2+ messages in thread
From: Lloyd Kremer @ 1991-07-19 13:30 UTC (permalink / raw)
In article <399@motto.UUCP> murray@motto.UUCP (Murray S. Kucherawy) writes:
>
>Under VMS V5.4-1, we're auditing CONTROL access failures on files, and
>the code below is causing these alarms. Can anyone figure out why
>and possibly suggest a fix?
Does it happen on opening any file or just those that you're not supposed to
be reading? :-)
Try setting the file protection to (S:RWED,O:RWED,G:RWED,W:RWED)
and see if it still fails.
If file protection is not the problem, file format may be. The file may be
in an RMS format that is incompatible with the default file type for C. Try
it on a file the was *created* by a C program using fopen().
Lloyd Kremer
Hilton Systems, Inc.
kremer@cs.odu.edu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1991-07-19 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1991-07-18 15:31 C file access in VMS Murray S. Kucherawy
1991-07-19 13:30 ` Lloyd Kremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox