/[smeserver]/rpms/e-smith-backup/sme7/e-smith-backup-1.14.0-RestoreMachineAccountGroups.patch
ViewVC logotype

Annotation of /rpms/e-smith-backup/sme7/e-smith-backup-1.14.0-RestoreMachineAccountGroups.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Jun 12 15:12:36 2007 UTC (17 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-backup-1_14_0-16_el4_sme, e-smith-backup-1_14_0-20_el4_sme, e-smith-backup-1_14_0-15_el4_sme, e-smith-backup-1_14_0-25_el4_sme, e-smith-backup-1_14_0-26_el4_sme, e-smith-backup-1_14_0-23_el4_sme, e-smith-backup-1_14_0-24_el4_sme, e-smith-backup-1_14_0-21_el4_sme, e-smith-backup-1_14_0-22_el4_sme, e-smith-backup-1_14_0-14_el4_sme, e-smith-backup-1_14_0-17_el4_sme, e-smith-backup-1_14_0-19_el4_sme, e-smith-backup-1_14_0-18_el4_sme
Branch point for: e-smith-backup-1_14-tree
Import on branch sme7 of package e-smith-backup-1.14.0-14.el4.sme.src.rpm

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-merged mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-merged
2     --- e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-merged 2003-05-20 12:59:27.000000000 -0600
3     +++ mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-merged 2007-01-26 13:20:11.000000000 -0700
4     @@ -55,3 +55,4 @@
5     tester:x:5001:
6     testgroup:x:5002:admin,www
7     test:x:5003:
8     +vita-weat$:x:5004:
9     diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-restored mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-restored
10     --- e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-restored 2003-05-16 16:12:26.000000000 -0600
11     +++ mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/group-restored 2007-01-26 13:22:44.000000000 -0700
12     @@ -45,3 +45,4 @@
13     tester:x:5001:
14     testgroup:x:5002:admin,www
15     test:x:5003:
16     +vita-weat$:x:5004:
17     diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-merged mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-merged
18     --- e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-merged 2003-05-16 15:32:48.000000000 -0600
19     +++ mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-merged 2007-01-26 13:20:35.000000000 -0700
20     @@ -47,3 +47,4 @@
21     tester:x:5001:5001:t t:/home/e-smith/files/users/tester:/bin/sshell
22     testgroup:x:5002:5002:for testing.:/home/e-smith:/bin/false
23     test:x:5003:5003:test:/home/e-smith/files/ibays/test/files:/bin/false
24     +vita-weat$:x:5004:5004:Hostname account for vita-weat$:/noexistingpath:/bin/false
25     diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-restored mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-restored
26     --- e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-restored 2003-05-16 15:39:11.000000000 -0600
27     +++ mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/tests/10e-smith-backup/passwd-restored 2007-01-26 13:22:20.000000000 -0700
28     @@ -37,3 +37,4 @@
29     tester:x:5001:5001:t t:/home/e-smith/files/users/tester:/bin/sshell
30     testgroup:x:5002:5002:for testing.:/home/e-smith:/bin/false
31     test:x:5003:5003:test:/home/e-smith/files/ibays/test/files:/bin/false
32     +vita-weat$:x:5004:5004:Hostname account for vita-weat$:/noexistingpath:/bin/false
33     diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm mezzanine_patched_e-smith-backup-1.14.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm
34     --- e-smith-backup-1.14.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2005-08-09 10:37:45.000000000 -0600
35     +++ mezzanine_patched_e-smith-backup-1.14.0/root/usr/lib/perl5/site_perl/esmith/Backup.pm 2007-01-26 13:27:51.000000000 -0700
36     @@ -1,5 +1,5 @@
37     #----------------------------------------------------------------------
38     -# Copyright 1999-2003 Mitel Networks Corporation
39     +# Copyright 1999-2007 Mitel Networks Corporation
40     # This program is free software; you can redistribute it and/or
41     # modify it under the same terms as Perl itself.
42     #----------------------------------------------------------------------
43     @@ -101,8 +101,8 @@
44    
45     =item *
46     Add back any users in the restored passwd file with home
47     -directories under /home/e-smith, or /noexistingpath (Samba
48     -machine accounts)
49     +directories under directories which contain user or
50     +machine accounts
51    
52     =item *
53     Log any other missing users or UID/GID mismatches
54     @@ -162,7 +162,7 @@
55     {
56     my @details = $merge_into->user($user);
57    
58     - if ( $merge_from->home($user) =~ m:^/(home/e-smith|noexistingpath): )
59     + if ( _homedir_ok($merge_from->home($user)) )
60     {
61     unless ( defined $details[0] )
62     {
63     @@ -211,10 +211,9 @@
64    
65     =item *
66     Add back any group in the restored group file for which
67     -there are corresponding users with with home
68     -directories under /home/e-smith. These users are checked
69     -from the passwd file specified in the environment variable
70     -ESMITH_BACKUP_PASSWD_FILE, or /etc/passwd.
71     +there are corresponding users with valid home directories.
72     +These users are checked from the passwd file specified in the environment
73     +variable ESMITH_BACKUP_PASSWD_FILE, or /etc/passwd.
74    
75     =item *
76     Log any other missing groups or GID mismatches
77     @@ -284,7 +283,7 @@
78     {
79     my @details = $merge_into->group($group);
80    
81     - if ( $passwd->user($group) and ( $passwd->home($group) =~ m:^/home/e-smith: ) )
82     + if ( $passwd->user($group) and _homedir_ok($passwd->home($group)) )
83     {
84     unless ( defined $details[0] )
85     {
86     @@ -443,6 +442,21 @@
87     }
88    
89    
90     +=head2 _homedir_ok
91     +
92     +Returns true if the given directory is one we want to
93     +restore: /home/e-smith for user accounts or
94     +/noexistingpath for machine accounts
95     +
96     +=cut
97     +
98     +sub _homedir_ok
99     +{
100     + my $dir = shift or return;
101     +
102     + return $dir =~ m:^/(home/e-smith|noexistingpath): ;
103     +}
104     +
105     =head1 AUTHOR
106    
107     SME Server Developers <bugs@e-smith.com>

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