Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Oct 2008 12:52:24 GMT
From:      Artis Caune <Artis.Caune@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/127979: [patch] www/nginx: don't rm -rf /var/tmp/nginx
Message-ID:  <200810091252.m99CqO0Q007921@www.freebsd.org>
Resent-Message-ID: <200810091300.m99D06n9009900@freefall.freebsd.org>

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

>Number:         127979
>Category:       ports
>Synopsis:       [patch] www/nginx: don't rm -rf /var/tmp/nginx
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 09 13:00:05 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Artis Caune
>Release:        stable/7
>Organization:
>Environment:
FreeBSD builder 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0 r183529M: Thu Oct  2 12:06:32 EEST 2008     root@builder:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
If you delete->add nginx package while it's running, temporary files could be lost.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- pkg-plist.orig	2007-09-19 11:48:24.000000000 +0300
+++ pkg-plist	2008-10-09 15:46:49.141406427 +0300
@@ -21,4 +21,5 @@
 sbin/nginx
 @exec [ -d %%NGINX_TMPDIR%% ] || mkdir -p %%NGINX_TMPDIR%%
 @exec chown %%WWWOWN%%:%%WWWGRP%% %%NGINX_TMPDIR%%
-@unexec rm -fr %%NGINX_TMPDIR%%
+@unexec find %%NGINX_TMPDIR%% -type d -empty -exec rmdir {} 2>/dev/null \; || true
+@unexec rmdir %%NGINX_TMPDIR%% 2>/dev/null || true


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



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