From clockwork@cse.tw  Wed Apr 21 12:40:19 2010
Return-Path: <clockwork@cse.tw>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DBE591065670
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Apr 2010 12:40:19 +0000 (UTC)
	(envelope-from clockwork@cse.tw)
Received: from cse.tw (cse.tw [140.138.145.237])
	by mx1.freebsd.org (Postfix) with ESMTP id 710218FC17
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Apr 2010 12:40:19 +0000 (UTC)
Received: from cse.tw (localhost [127.0.0.1])
	by cse.tw (Postfix) with ESMTP id 98B521E8C1D
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Apr 2010 20:19:24 +0800 (CST)
Received: (from clockwork@localhost)
	by cse.tw (8.14.4/8.14.3/Submit) id o3LCJOtH051401;
	Wed, 21 Apr 2010 20:19:24 +0800 (CST)
	(envelope-from clockwork)
Message-Id: <201004211219.o3LCJOtH051401@cse.tw>
Date: Wed, 21 Apr 2010 20:19:24 +0800 (CST)
From: Clockwork Box <femc7488@gmail.com>
Reply-To: Clockwork Box <femc7488@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] x11-fm/thunar: fix umask handling
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         145916
>Category:       ports
>Synopsis:       [PATCH] x11-fm/thunar: fix umask handling
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    oliver
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 21 12:50:04 UTC 2010
>Closed-Date:    Wed Jun 23 15:18:57 UTC 2010
>Last-Modified:  Wed Jun 23 15:18:57 UTC 2010
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->oliver 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Apr 21 12:50:16 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145916 
State-Changed-From-To: open->feedback 
State-Changed-By: oliver 
State-Changed-When: Wed Jun 9 04:36:09 UTC 2010 
State-Changed-Why:  
Could you please retest it with the new Thunar and give me a testcase how 
Thunar behaves differently from shell? I was not able to reproduce it, I 
created a directory with standard umask 022 and with 000 in both, Tcsh 
and Thunar-1.0.2 - without a difference in the modes of the created 
directory. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145916 
State-Changed-From-To: feedback->closed 
State-Changed-By: oliver 
State-Changed-When: Wed Jun 23 15:18:44 UTC 2010 
State-Changed-Why:  
already fixed in the latest version 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145916 
>Unformatted:
