Commit e4285c9a authored by rswindell's avatar rswindell
Browse files

Fixed sopen usage (need read/write perms when used with O_CREAT).

parent 0cc1f5fd
......@@ -72,7 +72,7 @@ int main()
/* Exclusive sopen test */
printf("\nsopen() test\n");
if((fd=sopen(LOCK_FNAME,O_RDWR|O_CREAT,SH_DENYRW))==-1) {
if((fd=sopen(LOCK_FNAME,O_RDWR|O_CREAT,SH_DENYRW,S_IREAD|S_IWRITE))==-1) {
perror(LOCK_FNAME);
return(errno);
}
......@@ -90,7 +90,7 @@ int main()
/* sopen()/lock test */
printf("\nlock() test\n");
if((fd=sopen(LOCK_FNAME,O_RDWR|O_CREAT,SH_DENYNO))==-1) {
if((fd=sopen(LOCK_FNAME,O_RDWR|O_CREAT,SH_DENYNO,S_IREAD|S_IWRITE))==-1) {
perror(LOCK_FNAME);
return(errno);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment