/[smeserver]/rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-migrate_machine_uid.patch
ViewVC logotype

Annotation of /rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-migrate_machine_uid.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Nov 30 18:55:58 2010 UTC (13 years, 11 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-samba-2_2_0-47_el5_sme, e-smith-samba-2_2_0-52_el5_sme, e-smith-samba-2_2_0-49_el5_sme, e-smith-samba-2_2_0-40_el5_sme, e-smith-samba-2_2_0-43_el5_sme, e-smith-samba-2_2_0-44_el5_sme, e-smith-samba-2_2_0-63_el5_sme, e-smith-samba-2_2_0-61_el5_sme, e-smith-samba-2_2_0-57_el5_sme, e-smith-samba-2_2_0-54_el5_sme, e-smith-samba-2_2_0-41_el5_sme, e-smith-samba-2_2_0-55_el5_sme, e-smith-samba-2_2_0-39_el5_sme, e-smith-samba-2_2_0-46_el5_sme, e-smith-samba-2_2_0-53_el5_sme, e-smith-samba-2_2_0-50_el5_sme, e-smith-samba-2_2_0-58_el5_sme, e-smith-samba-2_2_0-56_el5_sme, e-smith-samba-2_2_0-51_el5_sme, e-smith-samba-2_2_0-42_el5_sme, e-smith-samba-2_2_0-65_el5_sme, e-smith-samba-2_2_0-64_el5_sme, e-smith-samba-2_2_0-60_el5_sme, e-smith-samba-2_2_0-62_el5_sme, e-smith-samba-2_2_0-45_el5_sme, e-smith-samba-2_2_0-48_el5_sme, e-smith-samba-2_2_0-66_el5_sme, e-smith-samba-2_2_0-59_el5_sme, HEAD
* Tue Nov 30 2010 Daniel Berteaud <daniel@firewall-services.com> 2.2-0-39.sme
- Migrate existing machine uid in the DB (patch from Shad Lords) [SME: 6415]

1 vip-ire 1.1 --- e-smith-samba-2.2.0/root/etc/e-smith/db/accounts/migrate/40MachineUid.migrate_machine_uid 2010-11-30 19:53:06.000000000 +0100
2     +++ e-smith-samba-2.2.0/root/etc/e-smith/db/accounts/migrate/40MachineUid 2010-11-30 19:53:13.000000000 +0100
3     @@ -0,0 +1,14 @@
4     +{
5     + foreach my $machine ($DB->get_all_by_prop(type => 'machine'))
6     + {
7     + next if defined $machine->prop('Uid');
8     +
9     + my ($uid, $gid) = (getpwnam($machine->key))[2,3];
10     +
11     + next unless defined $uid;
12     + $machine->set_prop('Uid', $uid);
13     +
14     + next unless $gid != $uid;
15     + $machine->set_prop('Gid', $gid);
16     + }
17     +}

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