View | Details | Raw Unified | Return to bug 100914 | Differences between
and this patch

Collapse All | Expand All

(-)libexec/tftpd/tftpd.c (-2 / +8 lines)
Lines 538-545 validate_access(char **filep, int mode) Link Here
538
				dirp->name, filename);
538
				dirp->name, filename);
539
			if (stat(pathname, &stbuf) == 0 &&
539
			if (stat(pathname, &stbuf) == 0 &&
540
			    (stbuf.st_mode & S_IFMT) == S_IFREG) {
540
			    (stbuf.st_mode & S_IFMT) == S_IFREG) {
541
				if ((stbuf.st_mode & S_IROTH) != 0) {
541
				if (mode == RRQ) {
542
					break;
542
					if ((stbuf.st_mode & S_IROTH) != 0) {
543
						break;
544
					}
545
				} else {
546
					if ((stbuf.st_mode & S_IWOTH) != 0) {
547
						break;
548
					}
543
				}
549
				}
544
				err = EACCESS;
550
				err = EACCESS;
545
			}
551
			}

Return to bug 100914