/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-dont_remove_apache_group.patch
ViewVC logotype

Annotation of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-dont_remove_apache_group.patch

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


Revision 1.3 - (hide annotations) (download)
Sun Feb 16 04:28:45 2014 UTC (10 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_2_0-86_el5_sme, e-smith-backup-2_2_0-88_el5_sme, e-smith-backup-2_2_0-87_el5_sme, HEAD
Changes since 1.2: +1 -1 lines
* Sat Feb 15 2014 Ian Wells <esmith@wellsi.com> 2.2.0-86.sme
- Restore all groups on restore, fix typo in earlier patch [SME: 7932] [SME: 8210]

1 vip-ire 1.1 diff -Nur e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm e-smith-backup-2.2.0_bz7932/root/usr/lib/perl5/site_perl/esmith/Backup.pm
2     --- e-smith-backup-2.2.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2013-12-12 22:27:35.093555578 +0100
3     +++ e-smith-backup-2.2.0_bz7932/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2013-12-12 22:31:48.577920936 +0100
4     @@ -11,7 +11,7 @@
5    
6     use File::Copy;
7     use Unix::PasswdFile;
8     -use Unix::GroupFile;
9     +use Passwd::Unix;
10    
11     use vars qw($VERSION @ISA @EXPORT_OK);
12    
13     @@ -252,7 +252,7 @@
14     copy $restored, $tmp or warn "Couldn't copy $restored, $tmp\n";
15     copy $pre_restored, $restored or warn "Couldn't copy $pre_restored, $restored\n";
16    
17     - my $merge_from = new Unix::GroupFile($tmp, rmode => 'r' );
18     + my $merge_from = new Passwd::Unix(group => $tmp);
19    
20     unless ($merge_from)
21     {
22     @@ -260,7 +260,7 @@
23     return undef;
24     }
25    
26     - my $merge_into = new Unix::GroupFile($restored);
27 wellsi 1.3 + my $merge_into = new Passwd::Unix(group => $restored);
28 vip-ire 1.1
29     unless ($merge_into)
30     {
31     @@ -299,7 +299,9 @@
32     next;
33     }
34    
35     - unless ( $merge_into->gid($group) eq $merge_from->gid($group) )
36     + my ($merge_into_gid, undef) = $merge_into->group($group);
37     + my ($merge_from_gid, undef) = $merge_from->group($group);
38     + unless ($merge_into_gid eq $merge_from_gid)
39     {
40     warn "merge_group: $group - GID changed during restore\n";
41     next;
42     @@ -311,8 +313,6 @@
43     $merge_into->group($special_group, $merge_from->group($special_group));
44     }
45    
46     - $merge_into->commit;
47     -
48     return 1;
49     }
50    
51    

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