/[smeserver]/rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_var_cache_and_fix_sess.patch
ViewVC logotype

Annotation of /rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_var_cache_and_fix_sess.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sun Jun 26 17:43:08 2016 UTC (7 years, 11 months ago) by unnilennium
Branch: MAIN
CVS Tags: e-smith-ibays-2_6_0-11_el7_sme, e-smith-ibays-2_6_0-12_el7_sme, e-smith-ibays-2_6_0-17_el7_sme, e-smith-ibays-2_6_0-10_el7_sme, e-smith-ibays-2_6_0-15_el7_sme, e-smith-ibays-2_6_0-16_el7_sme, e-smith-ibays-2_6_0-20_el7_sme, e-smith-ibays-2_6_0-18_el7_sme, e-smith-ibays-2_6_0-13_el7_sme, e-smith-ibays-2_6_0-9_el7_sme, e-smith-ibays-2_6_0-7_el7_sme, e-smith-ibays-2_6_0-19_el7_sme, e-smith-ibays-2_6_0-14_el7_sme, e-smith-ibays-2_6_0-8_el7_sme, e-smith-ibays-2_6_0-6_el7_sme, HEAD
Changes since 1.1: +3 -3 lines
* Sun Jun 26 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-6.sme
- as per comment 2 of bug 0600 instead of 0700 for perms [SME: 9621]

1 unnilennium 1.1 diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-delete e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-delete
2     --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-delete 2013-01-31 16:31:37.000000000 -0500
3     +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-delete 2016-06-26 12:16:35.379000000 -0400
4     @@ -36,6 +36,7 @@
5     x=0 # exit value
6    
7     /bin/rm -rf /home/e-smith/files/ibays/$ibay
8     +/bin/rm -rf /var/cache/e-smith/files/ibays/$ibay
9     if [ "$ldapauth" != "enabled" ]
10     then
11     /usr/sbin/userdel "$ibay" || x=1
12     diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify
13     --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify 2016-06-26 12:03:21.373000000 -0400
14     +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify 2016-06-26 12:25:45.073000000 -0400
15     @@ -158,11 +158,14 @@
16     #--------------------------------------------------
17     # main directory is writeable only by root
18     #--------------------------------------------------
19     -##create the upload_tmp_folder in the ibay if PHPTmpDir is set to 'enabled'
20     +##create ibay cache dir
21     +my $cachedir= ('/var/cache/e-smith/files/ibays/' . $ibay->key );
22     +mkdir $cachedir unless (-d $cachedir);
23     +##create the upload_tmp_folder in the ibay cache dir if PHPTmpDir is set to 'enabled'
24     my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled';
25     $tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled';
26     mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled");
27     -
28     +##create the session dir in the ibay cache dir if is set to 'enabled'
29     my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled';
30     $sessdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session') if $sessdir eq 'enabled';
31     mkdir $sessdir unless (-d $sessdir || $sessdir eq "disabled");
32     diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays
33     --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays 2016-06-26 12:03:21.373000000 -0400
34     +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays 2016-06-26 12:15:18.526000000 -0400
35     @@ -71,18 +71,25 @@
36     {
37     #Then we retrieve the name of the ebay
38     my $key = $ibay->key;
39     - my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled';
40     - my $sessiondb = $ibay->prop('PHPSessionDir') || 'enabled';
41     - my $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp');
42     -
43     - #we test the condition if /tmp exists or if it is disabled in the Ibay
44     - unless (-d $path || $tmpdb eq "disabled")
45     + my $path = (('/var/cache/e-smith/files/ibays/') . $key );
46     + #we test the condition if ibay folder exists
47     + unless (-d $path )
48     {
49 unnilennium 1.2 mkdir $path, 0600 or warn "Could not create dir $path: $!";
50 unnilennium 1.1 chown $uid, $gid, $path or warn "Could not chown dir $path: $!";
51     }
52     - #we test the condition if /session exists or if it is disabled in the Ibay
53     - unless (-d $path || $sessiondb eq "disabled")
54     +
55     + $path = (('/var/cache/e-smith/files/ibays/') . $key . '/tmp');
56     + #we test the condition if /tmp exists
57     + unless (-d $path)
58     + {
59 unnilennium 1.2 + mkdir $path, 0600 or warn "Could not create dir $path: $!";
60 unnilennium 1.1 + chown $uid, $gid, $path or warn "Could not chown dir $path: $!";
61     + }
62     +
63     + $path = (('/var/cache/e-smith/files/ibays/') . $key . '/session');
64     + #we test the condition if /session exists
65     + unless (-d $path)
66     {
67 unnilennium 1.2 mkdir $path, 0600 or warn "Could not create dir $path: $!";
68 unnilennium 1.1 chown $uid, $gid, $path or warn "Could not chown dir $path: $!";

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed