Changeset 1878 for branches/fc15-dev/server/common/oursrc/execsys
- Timestamp:
- Jun 7, 2011, 12:58:14 PM (14 years ago)
- Location:
- branches/fc15-dev
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fc15-dev
- Property svn:mergeinfo changed
/trunk (added) merged: 1811,1813-1819,1821-1825,1838,1848-1856,1858-1872,1877
- Property svn:mergeinfo changed
-
branches/fc15-dev/server/common/oursrc/execsys/execsys-binfmt
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/fc15-dev/server/common/oursrc/execsys/ldapize.pl
r1798 r1878 7 7 use Net::LDAP::Filter; 8 8 9 sub report_error10 {11 my $proto = shift;12 my $mesg = shift;13 14 if ($proto eq 'git') {15 $mesg = "ERR \n " . $mesg . "\n";16 my $len = length($mesg)+4;17 printf "%04x%s", $len, $mesg;18 } else {19 print $mesg;20 }21 exit 0;22 }23 24 9 my $url = $ARGV[0]; 25 10 my ($proto, $hostname, $path) = $url =~ m|^(.*?)://([^/]*)(.*)| or die "Could not match URL"; 26 11 my $mesg; 27 12 13 my $vhostName = $hostname; 14 15 vhost: 28 16 # oh my gosh Net::LDAP::Filter SUCKS 29 17 my $filter = bless({and => … … 32 20 {or => 33 21 [{equalityMatch => {attributeDesc => 'scriptsVhostName', 34 assertionValue => $ hostname}},22 assertionValue => $vhostName}}, 35 23 {equalityMatch => {attributeDesc => 'scriptsVhostAlias', 36 assertionValue => $ hostname}}]}]},24 assertionValue => $vhostName}}]}]}, 37 25 'Net::LDAP::Filter'); 38 26 39 my $ldap = Net::LDAP->new("ldapi://%2fvar%2frun%2f dirsrv%2fslapd-scripts.socket/");27 my $ldap = Net::LDAP->new("ldapi://%2fvar%2frun%2fslapd-scripts.socket/"); 40 28 $mesg = $ldap->bind(); 41 29 $mesg->code && die $mesg->error; … … 46 34 47 35 my $vhostEntry = $mesg->pop_entry; 48 if (!$vhostEntry) 49 { 50 report_error($proto, "Could not find Host $hostname"); 36 if (!defined $vhostEntry) { 37 $vhostName ne '*' or die 'No vhost for *'; 38 $vhostName =~ s/^(?:\*\.)?[^.]*/*/; # Try next wildcard 39 goto vhost; 51 40 } 41 52 42 my $vhostDirectory = $vhostEntry->get_value('scriptsVhostDirectory'); 53 43 … … 59 49 my ($homeDirectory, $uidNumber, $gidNumber) = 60 50 map { $userEntry->get_value($_) } qw(homeDirectory uidNumber gidNumber); 51 (my $scriptsdir = $homeDirectory) =~ s{(?:/Scripts)?$}{/Scripts}; 61 52 62 53 if ($proto eq 'svn') { 63 54 chdir '/usr/libexec/scripts-trusted'; 64 exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/svn', "$ homeDirectory/Scripts/svn/$vhostDirectory");55 exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/svn', "$scriptsdir/svn/$vhostDirectory"); 65 56 } elsif ($proto eq 'git') { 57 if ($vhostEntry->get_value('scriptsVhostName') eq 'notfound.example.com') { 58 # git-daemon doesn’t report useful errors yet 59 my $msg = "ERR No such host $hostname\n"; 60 printf '%04x%s', length($msg) + 4, $msg; 61 exit; 62 } 66 63 chdir '/usr/libexec/scripts-trusted'; 67 exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/git', "$ homeDirectory/Scripts/git/$vhostDirectory");64 exec('/usr/sbin/suexec', $uidNumber, $gidNumber, '/usr/libexec/scripts-trusted/git', "$scriptsdir/git/$vhostDirectory"); 68 65 } elsif ($proto eq 'http') { 69 print "suexec $uidNumber $gidNumber $ homeDirectory/Scripts/web/$vhostDirectory/$path\n";66 print "suexec $uidNumber $gidNumber $scriptsdir/web/$vhostDirectory/$path\n"; 70 67 } else { 71 68 die "Unknown protocol\n"; -
branches/fc15-dev/server/common/oursrc/execsys/mime.types
r1784 r1878 509 509 application/xaml+xml xaml 510 510 application/x-silverlight-app xap 511 # The following MS Office MIME types are from this source: 512 # http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/05/08/office-2007-open-xml-mime-types.aspx 513 # There's a typo in .potm that's corrected in this alternate source: 514 # http://therightstuff.de/2006/12/16/Office+2007+File+Icons+For+Windows+SharePoint+Services+20+And+SharePoint+Portal+Server+2003.aspx 515 application/msword dot 516 application/vnd.openxmlformats-officedocument.wordprocessingml.document docx 517 application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx 518 application/vnd.ms-word.document.macroEnabled.12 docm 519 application/vnd.ms-word.template.macroEnabled.12 dotm 520 application/vnd.ms-excel xlt 521 application/vnd.ms-excel xla 522 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx 523 application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx 524 application/vnd.ms-excel.sheet.macroEnabled.12 xlsm 525 application/vnd.ms-excel.template.macroEnabled.12 xltm 526 application/vnd.ms-excel.addin.macroEnabled.12 xlam 527 application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb 528 application/vnd.ms-powerpoint pot 529 application/vnd.ms-powerpoint pps 530 application/vnd.ms-powerpoint ppa 531 application/vnd.openxmlformats-officedocument.presentationml.presentation pptx 532 application/vnd.openxmlformats-officedocument.presentationml.template potx 533 application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx 534 application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam 535 application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm 536 application/vnd.ms-powerpoint.template.macroEnabled.12 potm 537 application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm 538 # End MS Office MIME types. -
branches/fc15-dev/server/common/oursrc/execsys/upd-execsys
r1784 r1878 53 53 xls 54 54 ppt 55 dot 56 docx 57 dotx 58 docm 59 dotm 60 xlt 61 xla 62 xlsx 63 xltx 64 xlsm 65 xltm 66 xlam 67 xlsb 68 pot 69 pps 70 ppa 71 pptx 72 potx 73 ppsx 74 ppam 75 pptm 76 potm 77 ppsm 55 78 swf 56 79 mp3 … … 70 93 ttf 71 94 otf 95 odc 96 odb 97 odf 98 odg 99 otg 100 odi 101 odp 102 otp 103 ods 104 ots 105 odt 106 odm 107 ott 108 oth 72 109 ); 73 110
Note: See TracChangeset
for help on using the changeset viewer.