packages: ldap-account-manager/apache.conf, ldap-account-manager/ldap-accou...

glen glen at pld-linux.org
Mon Nov 2 13:33:33 CET 2009


Author: glen                         Date: Mon Nov  2 12:33:32 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- simplify, add -pdfdoc subpackage

---- Files affected:
packages/ldap-account-manager:
   apache.conf (1.1 -> 1.2) , ldap-account-manager.spec (1.20 -> 1.21) , configdir.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ldap-account-manager/apache.conf
diff -u packages/ldap-account-manager/apache.conf:1.1 packages/ldap-account-manager/apache.conf:1.2
--- packages/ldap-account-manager/apache.conf:1.1	Mon Nov  2 12:57:42 2009
+++ packages/ldap-account-manager/apache.conf	Mon Nov  2 13:33:26 2009
@@ -1,4 +1,43 @@
 Alias /lam /usr/share/ldap-account-manager
+
 <Directory /usr/share/ldap-account-manager>
+	Options +FollowSymLinks
+	AllowOverride All
+	Order allow,deny
 	Allow from all
+	DirectoryIndex index.html
+</Directory>
+
+<Directory /var/lib/ldap-account-manager/tmp>
+	Options -Indexes
+</Directory>
+
+<Directory /var/lib/ldap-account-manager/sess>
+	Options -Indexes
+	Order allow,deny
+	Deny from all
+</Directory>
+
+<Directory /var/lib/ldap-account-manager/config>
+	Options -Indexes
+	Order allow,deny
+	Deny from all
+</Directory>
+
+<Directory /usr/share/ldap-account-manager/lib>
+	Options -Indexes
+	Order allow,deny
+	Deny from all
+</Directory>
+
+<Directory /usr/share/ldap-account-manager/help>
+	Options -Indexes
+	Order allow,deny
+	Deny from all
+</Directory>
+
+<Directory /usr/share/ldap-account-manager/locale>
+	Options -Indexes
+	Order allow,deny
+	Deny from all
 </Directory>

================================================================
Index: packages/ldap-account-manager/ldap-account-manager.spec
diff -u packages/ldap-account-manager/ldap-account-manager.spec:1.20 packages/ldap-account-manager/ldap-account-manager.spec:1.21
--- packages/ldap-account-manager/ldap-account-manager.spec:1.20	Mon Nov  2 12:57:42 2009
+++ packages/ldap-account-manager/ldap-account-manager.spec	Mon Nov  2 13:33:26 2009
@@ -1,11 +1,13 @@
 # $Revision$, $Date$
+# TODO
+# - ldap schema package: docs/schema/dhcp.schema
 %include	/usr/lib/rpm/macros.perl
 Summary:	Administration of LDAP users, groups and hosts via Web GUI
 Summary(de.UTF-8):	Administration von Benutzern, Gruppen und Hosts für LDAP-Server
 Summary(pl.UTF-8):	LDAP Account Manager (LAM) - interfejs WWW do zarządzania kontami na serwerze LDAP
 Name:		ldap-account-manager
 Version:	2.8.0
-Release:	0.2
+Release:	0.10
 License:	GPL v2+
 Group:		Applications/WWW
 Source0:	http://dl.sourceforge.net/lam/%{name}-%{version}.tar.gz
@@ -13,6 +15,7 @@
 Source1:	apache.conf
 Source2:	lighttpd.conf
 URL:		http://lam.sourceforge.net/
+Patch0:	configdir.patch
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires:	perl-base
 Requires:	php-common >= 4:5.0
@@ -20,7 +23,6 @@
 Requires:	php-hash
 Requires:	php-iconv
 Requires:	php-ldap
-Requires:	php-mhash
 Requires:	php-pcre
 Requires:	php-session
 Requires:	php-xml
@@ -36,6 +38,7 @@
 %define		_webapp		%{name}
 %define		_sysconfdir	%{_webapps}/%{_webapp}
 %define		_appdir		%{_datadir}/%{_webapp}
+%define		_phpdocdir	%{_docdir}/phpdoc
 
 %description
 LDAP Account Manager (LAM) is a webfrontend for managing accounts
@@ -108,36 +111,47 @@
 Server installiert, auf dem Quotas und Heimatverzeichnisse verwaltet
 werden sollen.
 
+%package phpdoc
+Summary:	Online manual for LDAP Account Manager
+Summary(pl.UTF-8):	Dokumentacja online do LDAP Account Manager
+Group:		Documentation
+Requires:	php-dirs
+
+%description phpdoc
+Documentation for LDAP Account Manager.
+
+%description phpdoc -l pl.UTF-8
+Dokumentacja do LDAP Account Manager.
+
 %prep
 %setup -q
+%patch0 -p1
+
+cp -a config/config.cfg{_sample,}
+cp -a config/lam.conf{_sample,}
+mv config/*_sample .
+
+find -name .htaccess | xargs rm
+
+rm COPYING Makefile.in configure install.sh docs/README.fpdf.htm
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d \
-	$RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} \
-	$RPM_BUILD_ROOT%{_appdir}/{config,graphics,help,sess,style,tmp,templates,lib,locale}
-
-cp -a index.html $RPM_BUILD_ROOT%{_appdir}
-cp -a config/* $RPM_BUILD_ROOT%{_appdir}/config
-cp -a config/config.cfg_sample $RPM_BUILD_ROOT%{_sysconfdir}/config.cfg
-cp -a config/lam.conf_sample $RPM_BUILD_ROOT%{_sysconfdir}/lam.conf
-cp -a graphics/*.{png,jpg} $RPM_BUILD_ROOT%{_appdir}/graphics
-cp -a help/help.inc $RPM_BUILD_ROOT%{_appdir}/help
-cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib
-cp -a sess/.htaccess $RPM_BUILD_ROOT%{_appdir}/sess
-cp -a style/*css $RPM_BUILD_ROOT%{_appdir}/style
-cp -a templates/* $RPM_BUILD_ROOT%{_appdir}/templates
-cp -a tmp/.htaccess $RPM_BUILD_ROOT%{_appdir}/tmp
-cp -a locale/* $RPM_BUILD_ROOT%{_appdir}/locale
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_phpdocdir}}
 
-rm -f 	$RPM_BUILD_ROOT%{_appdir}/config/*_sample
+cp -a . $RPM_BUILD_ROOT%{_appdir}
 
+# config
+mv $RPM_BUILD_ROOT{%{_appdir}/config/*,%{_sysconfdir}}
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
 
-ln -s %{_sysconfdir}/config.cfg $RPM_BUILD_ROOT%{_appdir}/config/config.cfg
-ln -s %{_sysconfdir}/lam.conf $RPM_BUILD_ROOT%{_appdir}/config/lam.conf
+# apidocs
+mv $RPM_BUILD_ROOT{%{_appdir}/docs/devel,%{_phpdocdir}/%{name}}
+
+# in %doc
+rm $RPM_BUILD_ROOT%{_appdir}/{docs/*.txt,HISTORY,INSTALL,README,VERSION,copyright}
 
 %triggerin -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
@@ -162,16 +176,27 @@
 
 %files
 %defattr(644,root,root,755)
-%doc docs/*.txt COPYING HISTORY INSTALL README VERSION
+%doc docs/*.txt HISTORY INSTALL README VERSION copyright
 %dir %attr(750,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.cfg
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lam.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/passwordMailTemplate.txt
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shells
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/language
+%dir %attr(750,root,http) %{_sysconfdir}/pdf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdf/default.*.xml
+%dir %attr(750,root,http) %{_sysconfdir}/pdf/logos
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdf/logos/*.jpg
+%dir %attr(750,root,http) %{_sysconfdir}/profiles
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/profiles/default.*
+%dir %attr(750,root,http) %{_sysconfdir}/selfService
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/selfService/default.*
 
 %dir %{_appdir}
-%{_appdir}/config
+%{_appdir}/*_sample
 %{_appdir}/graphics
 %{_appdir}/help
 %{_appdir}/lib
@@ -182,20 +207,25 @@
 
 # XXX: use /var
 %dir %attr(740,http,http) %{_appdir}/sess
-%{_appdir}/sess/.htaccess
 %dir %attr(740,http,http) %{_appdir}/tmp
-%{_appdir}/tmp/.htaccess
 
 %files lamdaemon
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_appdir}/lib/lamdaemon.pl
 
+%files phpdoc
+%defattr(644,root,root,755)
+%{_phpdocdir}/%{name}
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.21  2009/11/02 12:33:26  glen
+- simplify, add -pdfdoc subpackage
+
 Revision 1.20  2009/11/02 11:57:42  glen
 - 2.8.0 tarball, merge with my spec written from scratch
 

================================================================
Index: packages/ldap-account-manager/configdir.patch
diff -u /dev/null packages/ldap-account-manager/configdir.patch:1.1
--- /dev/null	Mon Nov  2 13:33:33 2009
+++ packages/ldap-account-manager/configdir.patch	Mon Nov  2 13:33:26 2009
@@ -0,0 +1,235 @@
+--- ldap-account-manager-2.8.0/lib/config.inc	2009-11-02 14:12:38.657153013 +0200
++++ ldap-account-manager-2.8.0/lib/config.inc	2009-11-02 14:12:38.657153013 +0200
+@@ -100,7 +100,7 @@
+ * @return array profile names
+ */
+ function getConfigProfiles() {
+-	$dir = dir(substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config");
++	$dir = dir("/etc/webapps/ldap-account-manager");
+ 	$ret = array();
+ 	$pos = 0;
+ 	while ($entry = $dir->read()){
+@@ -442,7 +442,7 @@
+ 	 * @return string path on filesystem
+ 	 */
+ 	private function getPath() {
+-		return substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/" . $this->file . ".conf";
++		return "/etc/webapps/ldap-account-manager/" . $this->file . ".conf";
+ 	}
+ 
+ 	// functions to read/write preferences
+@@ -1044,7 +1044,7 @@
+ 	* @return boolean true if file was readable
+ 	*/
+ 	private function reload() {
+-		$conffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/config.cfg";
++		$conffile = "/etc/webapps/ldap-account-manager/config.cfg";
+ 		if (is_file($conffile) == True) {
+ 			$file = @fopen($conffile, "r");
+ 			if (!$file) return false; // abort if file is not readable
+@@ -1071,7 +1071,7 @@
+ 	* Saves preferences to config file config.cfg
+ 	*/
+ 	public function save() {
+-		$conffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/config.cfg";
++		$conffile = "/etc/webapps/ldap-account-manager/config.cfg";
+ 		if (is_file($conffile) == True) {
+ 			$file = fopen($conffile, "r");
+ 			$file_array = array();
+--- ldap-account-manager-2.8.0/lib/account.inc~	2009-10-28 18:35:23.000000000 +0200
++++ ldap-account-manager-2.8.0/lib/account.inc	2009-11-02 14:14:11.593795230 +0200
+@@ -40,8 +40,8 @@
+ function getshells() {
+ 	if (!isset($_SESSION['lampath'])) return array();
+ 	// Load shells from file
+-	if (file_exists($_SESSION['lampath'] . 'config/shells')) {
+-		$shells = file($_SESSION['lampath'] . 'config/shells');
++	if (file_exists('/etc/webapps/ldap-account-manager/shells')) {
++		$shells = file('/etc/webapps/ldap-account-manager/shells');
+ 		$i = 0;
+ 		while (count($shells) > $i) {
+ 			// remove whitespaces
+--- ldap-account-manager-2.8.0/lib/selfService.inc~	2009-10-27 20:45:22.000000000 +0200
++++ ldap-account-manager-2.8.0/lib/selfService.inc	2009-11-02 14:15:23.960530506 +0200
+@@ -136,7 +136,7 @@
+ */
+ function getSelfServiceProfiles() {
+ 	$types = getTypes();
+-	$dir = dir(substr(__FILE__, 0, strlen(__FILE__) - 20) . "/config/selfService");
++	$dir = dir("/etc/webapps/ldap-account-manager/selfService");
+ 	$ret = array();
+ 	while ($entry = $dir->read()){
+ 		$ext = substr($entry, strrpos($entry, '.') + 1);
+@@ -162,7 +162,7 @@
+ 	if (!preg_match("/^[0-9a-z _-]+$/i", $name)) return false;
+ 	if (!preg_match("/^[0-9a-z _-]+$/i", $scope)) return false;
+ 	$profile = new selfServiceProfile();
+-	$file = substr(__FILE__, 0, strlen(__FILE__) - 20) . "/config/selfService/" . $name . "." . $scope;
++	$file = "/etc/webapps/ldap-account-manager/selfService/" . $name . "." . $scope;
+ 	if (is_file($file) === True) {
+ 		$file = @fopen($file, "r");
+ 		if ($file) {
+@@ -198,7 +198,7 @@
+ 	if (!get_class($profile) === 'selfServiceProfile') {
+ 		return false;
+ 	}
+-	$path = substr(__FILE__, 0, strlen(__FILE__) - 20) . "/config/selfService/" . $name . "." . $scope;
++	$path = "/etc/webapps/ldap-account-manager/selfService/" . $name . "." . $scope;
+ 	$file = @fopen($path, "w");
+ 	if ($file) {
+ 	  	// write settings to file
+--- ldap-account-manager-2.8.0/lib/lamPDF.inc~	2009-10-27 20:45:22.000000000 +0200
++++ ldap-account-manager-2.8.0/lib/lamPDF.inc	2009-11-02 14:16:14.614959661 +0200
+@@ -87,7 +87,7 @@
+ 	 */
+ 	function header() {
+ 		if($this->page_definitions['filename'] != 'none') {
+-			$imageFile = substr(__FILE__,0,strlen(__FILE__)- 14) . "config/pdf/logos/" . $this->page_definitions['filename'];
++			$imageFile = "/etc/webapps/ldap-account-manager/pdf/logos/" . $this->page_definitions['filename'];
+ 			$width = $this->page_definitions['logo-width'];
+ 			$height = $this->page_definitions['logo-height'];
+ 			if($this->page_definitions['logo-max'] == true) {
+--- ldap-account-manager-2.8.0/lib/profiles.inc~	2009-10-27 20:45:22.000000000 +0200
++++ ldap-account-manager-2.8.0/lib/profiles.inc	2009-11-02 14:17:06.030616922 +0200
+@@ -36,7 +36,7 @@
+ * @return array profile names
+ */
+ function getAccountProfiles($scope) {
+-	$dir = @dir(substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles");
++	$dir = @dir("/etc/webapps/ldap-account-manager/profiles");
+ 	$ret = array();
+ 	$pos = 0;
+ 	if ($dir) {
+@@ -66,7 +66,7 @@
+ function loadAccountProfile($profile, $scope) {
+ 	if (!preg_match("/^[0-9a-z _-]+$/i", $profile) || !preg_match("/^[a-z]+$/i", $scope)) return false;
+ 	$settings = array();
+-	$file = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/" . $profile . "." . $scope;
++	$file = "/etc/webapps/ldap-account-manager/profiles/" . $profile . "." . $scope;
+ 	if (is_file($file) == True) {
+ 		$file = @fopen($file, "r");
+ 		if ($file) {
+@@ -114,7 +114,7 @@
+ 	if (!is_array($attributes)) {
+ 		return false;
+ 	}
+-	$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/" . $profile . "." . $scope;
++	$path = "/etc/webapps/ldap-account-manager/profiles/" . $profile . "." . $scope;
+ 	$file = @fopen($path, "w");
+ 	if ($file) {
+   	// write attributes
+@@ -147,7 +147,7 @@
+ function delAccountProfile($file, $scope) {
+ 	if (!$_SESSION['loggedIn'] == true) return false;
+ 	if (!preg_match("/^[0-9a-z _-]+$/i", $file) || !preg_match("/^[a-z]+$/i", $scope)) return false;
+-	$prof = substr(__FILE__, 0, strlen(__FILE__) - 16) . "config/profiles/" . $file . "." . $scope;
++	$prof = "/etc/webapps/ldap-account-manager/profiles/" . $file . "." . $scope;
+ 	if (is_file($prof)) {
+ 		return @unlink($prof);
+ 	}
+--- ldap-account-manager-2.8.0/lib/pdfstruct.inc~	2009-10-27 20:45:22.000000000 +0200
++++ ldap-account-manager-2.8.0/lib/pdfstruct.inc	2009-11-02 14:18:01.837096933 +0200
+@@ -46,7 +46,7 @@
+  */
+ function getPDFStructureDefinitions($scope = "user") {
+ 	$return = array();
+-	$path = $_SESSION['lampath'] . 'config/pdf/';
++	$path = '/etc/webapps/ldap-account-manager/pdf/';
+ 	if(is_dir($path)) {
+ 		$dirHandle = opendir($path);
+ 		while($file = readdir($dirHandle)) {
+@@ -71,7 +71,7 @@
+  */
+ function loadPDFStructureDefinitions($scope='user',$pdf_structure='default') {
+ 	$parser = new xmlParser();
+-	$file = $_SESSION['lampath'] . 'config/pdf/' . $pdf_structure . '.' . $scope . '.xml';
++	$file = '/etc/webapps/ldap-account-manager/pdf/' . $pdf_structure . '.' . $scope . '.xml';
+ 	$xml = $parser->parse($file);
+ 	$border = array();
+ 	$structure = array();
+@@ -100,8 +100,8 @@
+ function savePDFStructureDefinitions($scope,$definition) {
+ 	if (!preg_match('/[a-zA-Z0-9\-\_]+/',$definition)) return 'no perms';
+ 	if (!preg_match('/[a-zA-Z]+/',$scope)) return 'no perms';
+-	$struct_file = ($_SESSION['lampath'] . 'config/pdf/' . $definition . '.' . $scope . '.xml');
+-	if(!is_writable($_SESSION['lampath'] . 'config/pdf/')) {
++	$struct_file = ('/etc/webapps/ldap-account-manager/pdf/' . $definition . '.' . $scope . '.xml');
++	if(!is_writable('/etc/webapps/ldap-account-manager/pdf/')) {
+ 		return 'no perms';
+ 	}
+ 	else {
+@@ -158,7 +158,7 @@
+ function deletePDFStructureDefinition($scope, $definition) {
+ 	if (!preg_match('/[a-zA-Z0-9\-\_]+/',$definition)) return false;
+ 	if (!preg_match('/[a-zA-Z]+/',$scope)) return false;
+-	$file = $_SESSION['lampath'] . 'config/pdf/' . $definition . '.' . $scope . '.xml';
++	$file = '/etc/webapps/ldap-account-manager/pdf/' . $definition . '.' . $scope . '.xml';
+ 	if(is_file($file) && is_writable($file)) {
+ 		return unlink($file);
+ 	}
+@@ -175,7 +175,7 @@
+  */
+ function getAvailableLogos() {
+ 	$return = array();
+-	$dirPath = $_SESSION['lampath'] . '/config/pdf/logos/';
++	$dirPath = '/etc/webapps/ldap-account-manager/pdf/logos/';
+ 	$dirHandle = opendir($dirPath);
+ 	while($file = readdir($dirHandle)) {
+ 		if(!is_dir($file) && $file != '.' && $file != '..' && preg_match('/\\.(jpg|png)$/',$file)) {
+--- ldap-account-manager-2.8.0/templates/login.php~	2009-10-28 18:35:42.000000000 +0200
++++ ldap-account-manager-2.8.0/templates/login.php	2009-11-02 14:19:06.193764622 +0200
+@@ -157,7 +157,7 @@
+ 	$_SESSION['header'] .= "<meta http-equiv=\"pragma\" content=\"no-cache\">\n		<meta http-equiv=\"cache-control\" content=\"no-cache\">";
+ 
+ 	// loading available languages from language.conf file
+-	$languagefile = "../config/language";
++	$languagefile = "/etc/webapps/ldap-account-manager/language";
+ 	if(is_file($languagefile) == True)
+ 	{
+ 		$file = fopen($languagefile, "r");
+--- ldap-account-manager-2.8.0/templates/config/confmain.php~	2009-10-27 20:46:33.000000000 +0200
++++ ldap-account-manager-2.8.0/templates/config/confmain.php	2009-11-02 14:19:29.863970973 +0200
+@@ -326,7 +326,7 @@
+ echo ("<tr>");
+ echo ("<td><b>" . _("Default language") . ":</b></td><td>\n");
+ // read available languages
+-$languagefile = "../../config/language";
++$languagefile = "/etc/webapps/ldap-account-manager/language";
+ if(is_file($languagefile))
+ {
+ 	$file = fopen($languagefile, "r");
+--- ldap-account-manager-2.8.0/templates/config/profmanage.php~	2009-10-27 20:46:33.000000000 +0200
++++ ldap-account-manager-2.8.0/templates/config/profmanage.php	2009-11-02 14:21:36.393739313 +0200
+@@ -77,9 +77,9 @@
+ 			// check profile password
+ 			if ($_POST['addpassword'] && $_POST['addpassword2'] && ($_POST['addpassword'] == $_POST['addpassword2'])) {
+ 				// create new profile file
+-				@copy("../../config/lam.conf_sample", "../../config/" . $_POST['addprofile'] . ".conf");
+-				@chmod ("../../config/" . $_POST['addprofile'] . ".conf", 0600);
+-				$file = is_file("../../config/" . $_POST['addprofile'] . ".conf");
++				@copy("../../lam.conf_sample", "/etc/webapps/ldap-account-manager/" . $_POST['addprofile'] . ".conf");
++				@chmod ("/etc/webapps/ldap-account-manager/" . $_POST['addprofile'] . ".conf", 0600);
++				$file = is_file("/etc/webapps/ldap-account-manager/". $_POST['addprofile'] . ".conf");
+ 				if ($file) {
+ 					// load as config and write new password
+ 					$conf = new LAMConfig($_POST['addprofile']);
+@@ -96,8 +96,8 @@
+ 	// rename profile
+ 	elseif ($_POST['action'] == "rename") {
+ 		if (preg_match("/^[a-z0-9_-]+$/i", $_POST['renfilename']) && !in_array($_POST['renfilename'], getConfigProfiles())) {
+-			if (rename("../../config/" . $_POST['oldfilename'] . ".conf",
+-				"../../config/" . $_POST['renfilename'] . ".conf")) {
++			if (rename("/etc/webapps/ldap-account-manager/" . $_POST['oldfilename'] . ".conf",
++				"/etc/webapps/ldap-account-manager/" . $_POST['renfilename'] . ".conf")) {
+ 				$msg = _("Renamed profile.");
+ 			}
+ 			else $error = _("Could not rename file!");
+@@ -106,7 +106,7 @@
+ 	}
+ 	// delete profile
+ 	elseif ($_POST['action'] == "delete") {
+-		if (preg_match("/^[a-z0-9_-]+$/i", $_POST['delfilename']) && @unlink("../../config/" . $_POST['delfilename'] . ".conf")) {
++		if (preg_match("/^[a-z0-9_-]+$/i", $_POST['delfilename']) && @unlink("/etc/webapps/ldap-account-manager/" . $_POST['delfilename'] . ".conf")) {
+ 			$msg = _("Profile deleted.");
+ 		}
+ 		else $error = _("Unable to delete profile!");
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ldap-account-manager/apache.conf?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ldap-account-manager/ldap-account-manager.spec?r1=1.20&r2=1.21&f=u



More information about the pld-cvs-commit mailing list