]> andersk Git - moira.git/commitdiff
Include KERBEROS members of lists that are in the ATHENA realm.
authorzacheiss <zacheiss>
Thu, 8 Jun 2006 22:41:56 +0000 (22:41 +0000)
committerzacheiss <zacheiss>
Thu, 8 Jun 2006 22:41:56 +0000 (22:41 +0000)
gen/events.gen

index 34dc4427ae5d2106e8cc37f91289c5473a984004..ab883122056a2165a1c8e2ce3677fd3116b789e5 100755 (executable)
@@ -44,6 +44,27 @@ while (($name) = $sth->fetchrow_array) {
        $maybecomma = ",";
     }
 
+    $sth3 = $dbh->prepare("SELECT UNIQUE s.string FROM strings s, " .
+                         "imembers i, list l WHERE l.name = " . 
+                         $dbh->quote($name) .
+                         "AND l.list_id = i.list_id " .
+                         "AND i.member_type = 'KERBEROS' " .
+                         "AND i.member_id = s.string_id") || exit $MR_DBMS_ERR;
+    $sth3->execute || exit $MR_DBMS_ERR;
+
+    while (($member) = $sth3->fetchrow_array) {
+       # If principal is @ATHENA.MIT.EDU, strip realm, otherwise skip.
+       if ($member =~ /\@ATHENA.MIT.EDU/) {
+           $member =~ s/\@ATHENA.MIT.EDU//;
+       } else {
+           next;
+       }
+       $row = "$maybecomma$member";
+       $row =~ s/\0//g;
+       print OUT $row;
+       $maybecomma = ",";
+    }
+
     $row = "\n";
     $row =~ s/\0//g;
     print OUT $row;
This page took 0.067933 seconds and 5 git commands to generate.