Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 31 Dec 2004 01:34:14 -0800 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: 20041225 and 20041227 snapshots not creating files with correct permissions Message-ID: <20041231093413.GA3504@efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Organization: bs"d X-IsSubscribed: yes With the 20041225 and 20041227 snapshots, the following program erroneously shows mode: 0100644. 20041224 and earlier correctly show mode: 0100640. #include #include #include #include int main(int argc, char **argv) { int fd; struct stat s; (void)umask(0); fd = open("foo", O_RDWR|O_CREAT|O_EXCL, 0640); if (fd < 0) { perror("open failed"); } if (close(fd)) { perror("close failed"); } if (stat("foo", &s)) { perror("stat failed"); } printf("mode: 0%o\n", s.st_mode); if (unlink("foo")) { perror("unlink failed"); } return 0; } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/