/[smeserver]/rpms/e-smith-lib/sme8/e-smith-lib-2.2.0-UniqueUid.patch
ViewVC logotype

Annotation of /rpms/e-smith-lib/sme8/e-smith-lib-2.2.0-UniqueUid.patch

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


Revision 1.1 - (hide annotations) (download)
Wed Dec 9 23:49:22 2009 UTC (14 years, 10 months ago) by charliebrady
Branch: MAIN
CVS Tags: e-smith-lib-2_2_0-3_el5_sme, e-smith-lib-2_2_0-5_el5_sme, e-smith-lib-2_2_0-7_el5_sme, e-smith-lib-2_2_0-9_el5_sme, e-smith-lib-2_2_0-4_el5_sme, e-smith-lib-2_2_0-10_el5_sme, e-smith-lib-2_2_0-8_el5_sme, e-smith-lib-2_2_0-6_el5_sme, HEAD
Don't re-use uids when adding users. Bug 5659.

1 charliebrady 1.1 --- e-smith-lib-2.0.0/root/usr/lib/perl5/site_perl/esmith/AccountsDB.pm.bak 2009-01-28 16:13:40.000000000 +0100
2     +++ e-smith-lib-2.0.0/root/usr/lib/perl5/site_perl/esmith/AccountsDB.pm 2009-01-28 16:18:14.000000000 +0100
3     @@ -435,14 +435,17 @@
4     use esmith::ConfigDB;
5    
6     my $id;
7     - if (my $db = esmith::ConfigDB->open_ro)
8     + my $db = esmith::ConfigDB->open || die "Couldn't open config db";
9     +
10     + if ($id = $db->get('MinUid'))
11     + {
12     + $id = $id->value();
13     + }
14     + else
15     {
16     - if ($id = $db->get('MinUid'))
17     - {
18     - $id = $id->value();
19     - }
20     + $db->new_record('MinUid');
21     + $id = 5000;
22     }
23     - $id ||= 5000;
24    
25     my $maxid = 1 << 31;
26     setpwent();
27     @@ -454,6 +457,9 @@
28     }
29     endpwent();
30     endgrent();
31     +
32     + $db->set_value('MinUid', $id + 1);
33     +
34     return $id;
35     }
36    

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