From f801c179bc13058209dc3da0fcedf1badfcc312c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Fri, 19 Dec 2014 09:07:29 +0000 Subject: [PATCH] Remove old captcha dirs (#780) --- Makefile | 24 +++++++------------ _example/conf/lmConf-1 | 6 ----- debian/liblemonldap-ng-portal-perl.dirs | 3 +-- ...lemonldap-ng-portal-perl.lintian-overrides | 2 -- debian/rules | 9 ++----- rpm/lemonldap-ng.spec | 3 --- 6 files changed, 12 insertions(+), 35 deletions(-) diff --git a/Makefile b/Makefile index cfecf539a..f5709bf80 100644 --- a/Makefile +++ b/Makefile @@ -82,14 +82,10 @@ RAPACHEPSESSIONFILELOCKDIR=$(DESTDIR)/$(APACHEPSESSIONFILELOCKDIR) APACHEFILENOTIFDIR=$(DATADIR)/notifications RFILENOTIFDIR=$(DESTDIR)/$(APACHEFILENOTIFDIR) -# LL::NG captcha data dir -CAPTCHADIR=$(DATADIR)/captcha/data +# LL::NG captcha dir +CAPTCHADIR=$(DATADIR)/captcha RCAPTCHADIR=$(DESTDIR)/$(CAPTCHADIR) -# LL::NG captcha output dir -CAPTCHAOUTPUTDIR=$(PORTALDIR)/captcha_output -RCAPTCHAOUTPUTDIR=$(DESTDIR)/$(CAPTCHAOUTPUTDIR) - # Apache user/group APACHEUSER= APACHEGROUP= @@ -314,7 +310,7 @@ install_site: install_manager_site install_portal_site install_handler_site inst @echo "5 - Connect to Manager at http://manager.${DNSDOMAIN}/ to edit configuration" @echo @if [ ! "$(APACHEUSER)" ]; then \ - echo;echo " Warning, since APACHEUSER was not set, $(APACHESESSIONFILEDIR), $(APACHEPSESSIONFILEDIR), $(CAPTCHADIR), $(RCAPTCHAOUTPUTDIR) and $(CONFDIR) have permissive permissions."; \ + echo;echo " Warning, since APACHEUSER was not set, $(APACHESESSIONFILEDIR), $(APACHEPSESSIONFILEDIR), $(CAPTCHADIR) and $(CONFDIR) have permissive permissions."; \ echo " Fix them by yourself to restrict their view to apache process only"; \ fi @echo @@ -427,9 +423,7 @@ install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir @$(PERL) -000 -i -pe "s#^(persistentStorageOptions\\n\\s+)'[^\\n]*?'\$$#\$${1}\'\\\$$data1 = {&39;Directory&39; => &39;$(APACHEPSESSIONFILEDIR)&39;,&39;LockDirectory&39; => &39;$(APACHEPSESSIONFILELOCKDIR)&39;};'#m" $(RFILECONFIGDIR)/lmConf-1 @$(PERL) -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g;\ s#__SESSIONDIR__#$(APACHESESSIONFILEDIR)#g;\ - s#__NOTIFICATIONDIR__#$(APACHEFILENOTIFDIR)#g;\ - s#__CAPTCHADIR__#$(CAPTCHADIR)#g;\ - s#__CAPTCHAOUTPUTDIR__#$(CAPTCHAOUTPUTDIR)#g;' $(RFILECONFIGDIR)/lmConf-1 + s#__NOTIFICATIONDIR__#$(APACHEFILENOTIFDIR)#g;' $(RFILECONFIGDIR)/lmConf-1 @if [ "$(APACHEUSER)" != "" ]; then \ chown $(APACHEUSER) $(RFILECONFIGDIR) || exit 1; \ if [ "$(APACHEGROUP)" != "" ]; then \ @@ -470,16 +464,16 @@ install_notif_dir: fi install_captcha_dir: - @install -m 777 -v -d $(RCAPTCHADIR) $(RCAPTCHAOUTPUTDIR) + @install -m 777 -v -d $(RCAPTCHADIR) # Fix captcha directory permissions @if [ "$(APACHEUSER)" != "" ]; then \ - chown $(APACHEUSER) $(RCAPTCHADIR) $(RCAPTCHAOUTPUTDIR) || exit 1; \ + chown $(APACHEUSER) $(RCAPTCHADIR) || exit 1; \ if [ "$(APACHEGROUP)" != "" ]; then \ - chgrp $(APACHEGROUP) $(RCAPTCHADIR) $(RCAPTCHAOUTPUTDIR) || exit 1; \ + chgrp $(APACHEGROUP) $(RCAPTCHADIR) || exit 1; \ fi; \ - chmod 770 $(RCAPTCHADIR) $(RCAPTCHAOUTPUTDIR); \ + chmod 770 $(RCAPTCHADIR); \ else \ - chmod 777 $(RCAPTCHADIR) $(RCAPTCHAOUTPUTDIR); \ + chmod 777 $(RCAPTCHADIR); \ fi postconf_hosts: diff --git a/_example/conf/lmConf-1 b/_example/conf/lmConf-1 index 05b100771..2a8ac1724 100644 --- a/_example/conf/lmConf-1 +++ b/_example/conf/lmConf-1 @@ -82,9 +82,3 @@ notificationStorage notificationStorageOptions '$data1 = {'dirName' => '__NOTIFICATIONDIR__'};' -captcha_data - '__CAPTCHADIR__' - -captcha_output - '__CAPTCHAOUTPUTDIR__' - diff --git a/debian/liblemonldap-ng-portal-perl.dirs b/debian/liblemonldap-ng-portal-perl.dirs index 64c7694d8..a7a9f4ff9 100644 --- a/debian/liblemonldap-ng-portal-perl.dirs +++ b/debian/liblemonldap-ng-portal-perl.dirs @@ -1,5 +1,4 @@ -/var/lib/lemonldap-ng/captcha/data -/var/lib/lemonldap-ng/portal/captcha_output +/var/lib/lemonldap-ng/captcha /var/lib/lemonldap-ng/sessions/lock /var/lib/lemonldap-ng/psessions/lock /var/lib/lemonldap-ng/notifications diff --git a/debian/liblemonldap-ng-portal-perl.lintian-overrides b/debian/liblemonldap-ng-portal-perl.lintian-overrides index 6afd8753d..a3afcb28d 100644 --- a/debian/liblemonldap-ng-portal-perl.lintian-overrides +++ b/debian/liblemonldap-ng-portal-perl.lintian-overrides @@ -1,9 +1,7 @@ # If file storage is used for sessions, user passord may be stored in this # directory, so it must not be readable by all but must be writable by www-data liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/captcha/ 0770 != 0755 -liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/captcha/data/ 0770 != 0755 liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/notifications/ 0770 != 0755 -liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/portal/captcha_output/ 0770 != 0755 liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/sessions/lock/ 0770 != 0755 liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/sessions/ 0770 != 0755 liblemonldap-ng-portal-perl: non-standard-dir-perm var/lib/lemonldap-ng/psessions/lock/ 0770 != 0755 diff --git a/debian/rules b/debian/rules index 4a848256d..22262aca0 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,6 @@ CONFSTORAGEDIR=$(LMVARDIR)/conf FIRSTCONFFILE=$(CONFSTORAGEDIR)/lmConf-1 LMINIFILE=$(CONFDIR)/lemonldap-ng.ini CAPTCHADIR=$(LMVARDIR)/captcha -CAPTCHAOUTPUTDIR=$(LMVARDIR)/portal/captcha_output %: dh $@ @@ -68,17 +67,13 @@ override_dh_fixperms: debian/*/$(PSESSIONSDIR)/lock \ debian/*/$(NOTIFICATIONSDIR) \ debian/liblemonldap-ng-common-perl/$(CONFSTORAGEDIR) \ - debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR) \ - debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR)/data \ - debian/liblemonldap-ng-portal-perl/$(CAPTCHAOUTPUTDIR) + debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR) chgrp www-data debian/liblemonldap-ng-common-perl/$(LMINIFILE) \ debian/liblemonldap-ng-common-perl/$(FIRSTCONFFILE) chmod 770 debian/*/$(SESSIONSDIR) debian/*/$(SESSIONSDIR)/lock \ debian/*/$(PSESSIONSDIR) debian/*/$(PSESSIONSDIR)/lock \ debian/*/$(NOTIFICATIONSDIR) \ - debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR) \ - debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR)/data \ - debian/liblemonldap-ng-portal-perl/$(CAPTCHAOUTPUTDIR) + debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR) chmod 750 debian/liblemonldap-ng-common-perl/$(CONFSTORAGEDIR) chmod 640 debian/liblemonldap-ng-common-perl/$(FIRSTCONFFILE) \ debian/liblemonldap-ng-common-perl/$(LMINIFILE) diff --git a/rpm/lemonldap-ng.spec b/rpm/lemonldap-ng.spec index 905248c2d..7d44b7a1e 100644 --- a/rpm/lemonldap-ng.spec +++ b/rpm/lemonldap-ng.spec @@ -390,8 +390,6 @@ chmod 770 %{buildroot}%{lm_vardir}/psessions chmod 770 %{buildroot}%{lm_vardir}/psessions/lock chmod 770 %{buildroot}%{lm_vardir}/notifications chmod 770 %{buildroot}%{lm_vardir}/captcha -chmod 770 %{buildroot}%{lm_vardir}/captcha/data -chmod 770 %{buildroot}%{lm_vardir}/portal/captcha_output # Touch for ghost mkdir -p %buildroot%{apache_confdir} @@ -526,7 +524,6 @@ rm -rf %{buildroot} %{lm_sharedir}/portal-skins %defattr(750,%{lm_apacheuser},%{lm_apachegroup},-) %dir %{lm_vardir}/captcha -%dir %{lm_vardir}/captcha/data %files -n lemonldap-ng-test %defattr(-,root,root,-)