From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Aug 23 15:20:03 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F6DD106567D for ; Sat, 23 Aug 2008 15:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3A43C8FC0A for ; Sat, 23 Aug 2008 15:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NFK3ar025625 for ; Sat, 23 Aug 2008 15:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7NFK37j025624; Sat, 23 Aug 2008 15:20:03 GMT (envelope-from gnats) Resent-Date: Sat, 23 Aug 2008 15:20:03 GMT Resent-Message-Id: <200808231520.m7NFK37j025624@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Heiner Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AE0D1065677 for ; Sat, 23 Aug 2008 15:17:43 +0000 (UTC) (envelope-from h.eichmann@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id E3EB68FC16 for ; Sat, 23 Aug 2008 15:17:42 +0000 (UTC) (envelope-from h.eichmann@gmx.de) Received: (qmail invoked by alias); 23 Aug 2008 14:51:00 -0000 Received: from p54827840.dip.t-dialin.net (EHLO 7of9.unimatrix-zero.borg) [84.130.120.64] by mail.gmx.net (mp060) with SMTP; 23 Aug 2008 16:51:00 +0200 Message-Id: <200808231649.49858.h.eichmann@gmx.de> Date: Sat, 23 Aug 2008 16:49:49 +0200 From: Heiner To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/126767: [patch] german/tipp10: fix problem with not writable database X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 15:20:03 -0000 >Number: 126767 >Category: ports >Synopsis: [patch] german/tipp10: fix problem with not writable database >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Aug 23 15:20:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Heiner Eichmann >Release: FreeBSD 7.0 >Organization: Sirius Cybernetics Corp. >Environment: FreeBSD 7of9.unimatrix-zero.borg 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Sun Jul 20 22:53:06 CEST 2008 root@7of9.unimatrix-zero.borg:/usr/obj/usr/src/sys/MYKERNEL i386 >Description: Lucius Windschuh reported, that an ordinary ueser does not have write access to the tipp10 database (thanks for the report). The reason is, that the database template copied into the users directory has the access mode 444. The attached patch corrects this. Heiner >How-To-Repeat: >Fix: See the attached patch. It just adds a file into the files directory --Boundary-00=_NOCsIbUUf0ctCRM Content-Type: text/x-diff; charset="iso-8859-1"; name="tipp10.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tipp10.diff" diff -urN ../tipp10.orig/files/patch-sql-connection.h ./files/patch-sql-connection.h --- ../tipp10.orig/files/patch-sql-connection.h 1970-01-01 01:00:00.000000000 +0100 +++ ./files/patch-sql-connection.h 2008-08-21 23:02:09.000000000 +0200 @@ -0,0 +1,18 @@ +--- sql/connection.h.orig 2008-08-21 22:44:33.000000000 +0200 ++++ sql/connection.h 2008-08-21 22:59:21.000000000 +0200 +@@ -170,6 +170,7 @@ + // -> copy database to user home dir + QFile file(QCoreApplication::applicationDirPath() + "/" + dbNameTemplate); + if (file.copy(dbPath)) { ++ QFile::setPermissions(dbPath, QFile::permissions(dbPath) | QFile::WriteUser); + dbExist = true; + } else { + ErrorMessage *errorMessage = new ErrorMessage(); +@@ -201,6 +202,7 @@ + dir.cd("tipp10"); + QFile file(dbPath); + if (file.copy(dir.path() + "/" + dbNameUser)) { ++ QFile::setPermissions(dir.path() + "/" + dbNameUser, QFile::permissions(dir.path() + "/" + dbNameUser) | QFile::WriteUser); + dbPath = dir.path() + "/" + dbNameUser; + } else { + ErrorMessage *errorMessage = new ErrorMessage(); --Boundary-00=_NOCsIbUUf0ctCRM-- >Release-Note: >Audit-Trail: >Unformatted: --Boundary-00=_NOCsIbUUf0ctCRM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline