- (ad_open(upath, ADFLAGS_DF, O_RDONLY, 0, ofork->of_ad) < 0))
- goto openfork_err;
-
- adflags = ADFLAGS_DF;
- }
- break;
- case ENOENT:
- {
- struct stat st;
-
- /* see if client asked for the data fork */
- if (fork == OPENFORK_DATA) {
- if (((access & OPENACC_WR) &&
- (ad_open(upath, ADFLAGS_DF, O_RDWR, 0, ofork->of_ad) < 0))
- || (ad_open(upath, ADFLAGS_DF, O_RDONLY, 0,
- ofork->of_ad) < 0)) {
- goto openfork_err;
- }
- adflags = ADFLAGS_DF;
-
- } else if (stat(upath, &st) == 0) {
- /* here's the deal. we only try to create the resource
- * fork if the user wants to open it for write access. */
- if ((access & OPENACC_WR) &&
- (ad_open(upath, adflags, O_RDWR | O_CREAT,
- 0666, ofork->of_ad) < 0))
- goto openfork_err;
- } else
+ (ad_open(upath, ADFLAGS_DF, O_RDONLY, 0, ofork->of_ad) < 0))
+ goto openfork_err;
+
+ adflags = ADFLAGS_DF;
+ break;
+ case ENOENT:
+ {
+ struct stat st;
+
+ /* see if client asked for the data fork */
+ if (fork == OPENFORK_DATA) {
+ if (ad_open(upath, ADFLAGS_DF, O_RDONLY, 0, ofork->of_ad) < 0) {