[aur-dev] [PATCH] pkgsubmit: correctly set group permssions on extracted files

Dan McGee dan at archlinux.org
Fri Oct 24 17:29:04 EDT 2008


Use the new chmod_group() function to do so.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 web/html/pkgsubmit.php |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 78d6e50..3612403 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -44,6 +44,10 @@ if ($_COOKIE["AURSID"]):
 						if (!$extract) {
 							$error = __("Unknown file format for uploaded file.");
 						}
+						if (!chmod_group($tempdir)) {
+							$error = __("Could not chmod directory %s.",
+								array($tempdir));
+						}
 					}
 				}
 			}
@@ -215,6 +219,11 @@ if ($_COOKIE["AURSID"]):
 				if (!@mkdir(INCOMING_DIR . $pkg_name)) {
 					$error = __( "Could not create directory %s.",
 						INCOMING_DIR . $pkg_name);
+				} else {
+					if (!@chmod(INCOMING_DIR . $pkg_name, 0775)) {
+						$error = __( "Could not chmod directory %s.",
+							INCOMING_DIR . $pkg_name);
+					}
 				}
 
 				rename($pkg_dir, INCOMING_DIR . $pkg_name . "/" . $pkg_name);
-- 
1.6.0.3




More information about the aur-dev mailing list