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
1 debathena-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 1 8 debathena-evolution-wrapper (10.0.9) unstable; urgency=low 2 9 3 10 * Always create a new folder state file after initializing the -
debathena/debathena/evolution-wrapper/evolution.debathena
23 23 } 24 24 } 25 25 26 # Look up user inbox in Hesiod.26 # Pick server to use 27 27 my $user = $ENV{"ATHENA_USER"} || $ENV{"USER"} || getpwuid($<); 28 my $result = `hesinfo $user pobox`; 29 my @fields = split(' ', $result); 30 my $server = $fields[1]; 28 my $server = "$user.mail.mit.edu"; 31 29 32 unless ($server) {33 warn "Could not obtain Hesiod POBOX information for $user\n";34 exec("/usr/bin/evolution.debathena-orig", @ARGV);35 }36 37 30 # 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. 40 32 # For an Exchange account (or anything else), use password for now. 41 33 # (Ideally some day we will use GSSAPI everywhere). 42 34 my $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 } 35 my ($real_server) = gethostbyname($server); 36 if ($real_server =~ /po\d+\.mail\.mit\.edu/i) { 37 $auth = ";auth=GSSAPI"; 48 38 } 49 39 50 40 # Regular expression for the server names we recognize when updating 51 41 # the IMAP account setting. We also convert Athena 9.4-style Hesiod 52 42 # specifications (although it should be unusual to see one due to 53 43 # debathena-gconf2-config). 54 my $serverRE = '(po\d+\.mit\.edu)|((imap\.)?exchange\.mit\.edu)|(_hesiod)';44 my $serverRE = "($user" . '\.mail\.mit\.edu)|(po\d+\.mit\.edu)|((imap\.)?exchange\.mit\.edu)|(_hesiod)'; 55 45 my $old_server = ""; 56 46 57 47 my $client = Gnome2::GConf::Client->get_default;