Ticket #402: evolution-wrapper-gssapi.diff

File evolution-wrapper-gssapi.diff, 2.5 KB (added by broder, 15 years ago)
  • debathena/debathena/evolution-wrapper/debian/changelog

     
     1debathena-evolution-wrapper (10.0.10) unstable; urgency=low 
     2 
     3  * Update evolution wrapper to use username.mail.mit.edu and GSSAPI 
     4    instead of Hesiod and krb4. (Trac: #402) 
     5 
     6 -- Evan Broder <broder@mit.edu>  Mon, 12 Oct 2009 13:41:50 -0400 
     7 
    18debathena-evolution-wrapper (10.0.9) unstable; urgency=low 
    29 
    310  * Always create a new folder state file after initializing the 
  • debathena/debathena/evolution-wrapper/evolution.debathena

     
    2323    } 
    2424} 
    2525 
    26 # Look up user inbox in Hesiod. 
     26# Pick server to use 
    2727my $user = $ENV{"ATHENA_USER"} || $ENV{"USER"} || getpwuid($<); 
    28 my $result = `hesinfo $user pobox`; 
    29 my @fields = split(' ', $result); 
    30 my $server = $fields[1]; 
     28my $server = "$user.mail.mit.edu"; 
    3129 
    32 unless ($server) { 
    33     warn "Could not obtain Hesiod POBOX information for $user\n"; 
    34     exec("/usr/bin/evolution.debathena-orig", @ARGV); 
    35 } 
    36  
    3730# Determine the authentication method to use for the IMAP server. 
    38 # For a Cyrus PO server account we use krb4, if the installed package 
    39 # supports it. 
     31# For a Cyrus PO server account we use GSSAPI. 
    4032# For an Exchange account (or anything else), use password for now. 
    4133# (Ideally some day we will use GSSAPI everywhere). 
    4234my $auth = ""; 
    43 if ($server =~ /po\d+\.mit\.edu/i) { 
    44     my $provides = `dpkg-query -Wf '\${Provides}' 'libcamel*'`; 
    45     if ($provides =~ /debathena-libcamel-krb4/) { 
    46         $auth = ";auth=KERBEROS_V4"; 
    47     } 
     35my ($real_server) = gethostbyname($server); 
     36if ($real_server =~ /po\d+\.mail\.mit\.edu/i) { 
     37    $auth = ";auth=GSSAPI"; 
    4838} 
    4939 
    5040# Regular expression for the server names we recognize when updating 
    5141# the IMAP account setting.  We also convert Athena 9.4-style Hesiod 
    5242# specifications (although it should be unusual to see one due to 
    5343# debathena-gconf2-config). 
    54 my $serverRE = '(po\d+\.mit\.edu)|((imap\.)?exchange\.mit\.edu)|(_hesiod)'; 
     44my $serverRE = "($user" . '\.mail\.mit\.edu)|(po\d+\.mit\.edu)|((imap\.)?exchange\.mit\.edu)|(_hesiod)'; 
    5545my $old_server = ""; 
    5646 
    5747my $client = Gnome2::GConf::Client->get_default;