[PATCH] jfsutils: pass mode bits when calling open with O_CREAT
Josh Boyer <[email protected]> Thu, 23 Aug 2007 21:57:26 -0500
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
Recent glibc builds will fail to compile jfsutils when -DFORTIFY_SOURCE is passed in CFLAGS due to open being called with O_CREAT and no mode parameter. This was seen in Fedora rawhide recently. The patch below fixes it. Signed-off-by: Josh Boyer <[email protected]> Index: jfsutils-1.1.11/libfs/fssubs.c =================================================================== --- jfsutils-1.1.11.orig/libfs/fssubs.c +++ jfsutils-1.1.11/libfs/fssubs.c @@ -59,7 +59,7 @@ int Is_Root_Mounted_RO() #define TEST_FILE "/.ismount-test-file" - fd = open(TEST_FILE, O_RDWR | O_CREAT); + fd = open(TEST_FILE, O_RDWR | O_CREAT, 0644); if (fd < 0) { if (errno == EROFS) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/