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 |
|
|
|