Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 2010 20:19:24 +0800 (CST)
From:      Clockwork Box <femc7488@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/145916: [PATCH] x11-fm/thunar: fix umask handling
Message-ID:  <201004211219.o3LCJOtH051401@cse.tw>
Resent-Message-ID: <201004211250.o3LCo4SF023805@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         145916
>Category:       ports
>Synopsis:       [PATCH] x11-fm/thunar: fix umask handling
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 21 12:50:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Clockwork Box
>Release:        FreeBSD 8.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD cse.tw 8.0-STABLE FreeBSD 8.0-STABLE #7: Tue Mar 2 04:12:11 CST 2010 gaod@cse.tw:/usr/obj/usr/src/sys/CSETW i386


	
>Description:
	Fix umsk handling, when create directory.
>How-To-Repeat:
	
>Fix:

	

--- thunar.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/x11-fm/thunar.orig/files/patch-thunar-vfs-io-jobs.c /usr/ports/x11-fm/thunar/files/patch-thunar-vfs-io-jobs.c
--- /usr/ports/x11-fm/thunar.orig/files/patch-thunar-vfs-io-jobs.c	1970-01-01 08:00:00.000000000 +0800
+++ /usr/ports/x11-fm/thunar/files/patch-thunar-vfs-io-jobs.c	2010-04-19 22:40:29.000000000 +0800
@@ -0,0 +1,20 @@
+--- thunar-vfs/thunar-vfs-io-jobs.c.orig	2010-04-19 22:37:13.000000000 +0800
++++ thunar-vfs/thunar-vfs-io-jobs.c	2010-04-19 22:39:12.000000000 +0800
+@@ -433,7 +433,7 @@
+ 
+ again:
+       /* try to create the file at the given path */
+-      fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE);
++      fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0666);
+       if (G_UNLIKELY (fd < 0))
+         {
+           /* check if the file already exists */
+@@ -708,7 +708,7 @@
+       _thunar_vfs_job_process_path (job, lp);
+ 
+       /* try to create the target directory */
+-      if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777 & ~umask(0), THUNAR_VFS_IO_OPS_NONE, error))
++      if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777, THUNAR_VFS_IO_OPS_NONE, error))
+         return FALSE;
+     }
+ 
--- thunar.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004211219.o3LCJOtH051401>