/[smeserver]/rpms/e-smith-samba/sme7/e-smith-samba-1.14.0-domaingroups.patch
ViewVC logotype

Annotation of /rpms/e-smith-samba/sme7/e-smith-samba-1.14.0-domaingroups.patch

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


Revision 1.2 - (hide annotations) (download)
Sat Dec 15 16:01:18 2007 UTC (16 years, 10 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Import on branch sme7 of package e-smith-samba-1.14.1-1.el4.sme.src.rpm

1 bytegw 1.1 diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-1.14.0/createlinks mezzanine_patched_e-smith-samba-1.14.0/createlinks
2     --- e-smith-samba-1.14.0/createlinks 2007-12-14 09:59:55.000000000 -0700
3     +++ mezzanine_patched_e-smith-samba-1.14.0/createlinks 2007-12-14 09:59:34.000000000 -0700
4     @@ -14,6 +14,9 @@
5     ibay-delete
6     ibay-modify
7     ibay-modify-servers
8     + group-create
9     + group-modify
10     + group-delete
11     network-delete
12     network-create
13     post-install
14     diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-1.14.0/root/etc/e-smith/events/actions/update-domain-group-maps mezzanine_patched_e-smith-samba-1.14.0/root/etc/e-smith/events/actions/update-domain-group-maps
15     --- e-smith-samba-1.14.0/root/etc/e-smith/events/actions/update-domain-group-maps 2007-12-14 09:59:55.000000000 -0700
16     +++ mezzanine_patched_e-smith-samba-1.14.0/root/etc/e-smith/events/actions/update-domain-group-maps 2007-12-14 09:58:27.000000000 -0700
17     @@ -31,20 +31,30 @@
18     (map { $_->prop('FirstName')." ".$_->prop('LastName'), $_->key } $a->users()),
19     (map { $_->prop('Description'), $_->key } $a->groups()));
20    
21     +my %ridmap = (
22     + 'Domain Admins' => '512',
23     + 'Domain Users' => '513',
24     + 'Domain Guests' => '514');
25     +
26     my %mapping_done = ();
27     foreach (`/usr/bin/net groupmap list`)
28     {
29     chomp;
30     - if (/^(.*?) \((S-.*)\) -> (.*)$/)
31     + if (/^(.*?) \((S-.*-(\d+))\) -> (.*)$/)
32     {
33     - my ($nt, $sid, $group) = ($1, $2, $3);
34     + my ($nt, $sid, $rid, $group) = ($1, $2, $3, $4);
35    
36     # Skip local groups
37     next if ($sid =~ /^S-1-5-32-\d+$/);
38    
39     if (exists $mappings{$nt})
40     {
41     - if ($sid =~ /^$local_sid-/)
42     + if ($ridmap{$nt} && $ridmap{$nt} ne $rid)
43     + {
44     + # Wrong (old?) sid
45     + system('/usr/bin/net','groupmap','delete',"sid=$sid");
46     + }
47     + elsif ($sid =~ /^$local_sid-/)
48     {
49     my $ug = $mappings{$nt};
50     system('/usr/bin/net',$debug,
51     @@ -75,5 +85,6 @@
52     'groupmap','add',
53     "ntgroup=$_",
54     "unixgroup=" . $mappings{$_},
55     + $ridmap{$_} ? "rid=$ridmap{$_}" : (),
56     'type=d');
57     }

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