From 506dbc2816afacc84f664463a511f7c42eaa69ec Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 22 Sep 2007 19:02:43 -0400 Subject: [PATCH] Improved qsheff to set the right permissions without a postinstall - chmod has to be done after chown when SUID --- mail/qsheff/qsheff.conf | 5 +++++ mail/qsheff/qsheff.postinstall | 19 ------------------- 2 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 mail/qsheff/qsheff.postinstall diff --git a/mail/qsheff/qsheff.conf b/mail/qsheff/qsheff.conf index aa707fafd..bcb80720d 100644 --- a/mail/qsheff/qsheff.conf +++ b/mail/qsheff/qsheff.conf @@ -41,3 +41,8 @@ qsheff_create_var() { mkdir -p $root$datadir/{backup,quarantine}/{0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,x} } +hook_add postmake 5 'qsheff_permissions' +qsheff_permissions() { + chown -v root:21 $root$bindir/qsheff + chmod -v 4511 $root$bindir/qsheff +} diff --git a/mail/qsheff/qsheff.postinstall b/mail/qsheff/qsheff.postinstall deleted file mode 100644 index 3c807949a..000000000 --- a/mail/qsheff/qsheff.postinstall +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../qsheff/qsheff.postinstall -# Copyright (C) 2006 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. A copy of the -# GNU General Public License can be found in the file COPYING. -# --- SDE-COPYRIGHT-NOTE-END --- - - -echo "Fixing permissions of qsheff..." -chmod -v 4511 D_bindir/qsheff -chown -v root:qmail D_bindir/qsheff