From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RdT4z-0008Vg-Q0 for garchives@archives.gentoo.org; Wed, 21 Dec 2011 20:48:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A11621C0CA; Wed, 21 Dec 2011 20:47:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1862121C0CA for ; Wed, 21 Dec 2011 20:47:54 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 584511B4033 for ; Wed, 21 Dec 2011 20:47:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 797F780042 for ; Wed, 21 Dec 2011 20:47:52 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: Subject: [gentoo-commits] proj/hardened-patchset:rsbac commit in: scripts/ X-VCS-Repository: proj/hardened-patchset X-VCS-Files: scripts/fetch_grsecurity_test.pl scripts/mk.rsbac.patch.sh X-VCS-Directories: scripts/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: e2d85b736a62ecb4dd822ea13ea861d871d9bf89 Date: Wed, 21 Dec 2011 20:47:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2747328e-9c89-47ec-a3b0-09cd2adf8c01 X-Archives-Hash: 4e7bfb7663052d68a2ceff3a51b9e68c commit: e2d85b736a62ecb4dd822ea13ea861d871d9bf89 Author: Anthony G. Basile gentoo org> AuthorDate: Wed Dec 21 20:47:47 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Wed Dec 21 20:47:47 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-patc= hset.git;a=3Dcommit;h=3De2d85b73 Renamed rsbac pathset --- scripts/fetch_grsecurity_test.pl | 209 --------------------------------= ------ scripts/mk.rsbac.patch.sh | 2 +- 2 files changed, 1 insertions(+), 210 deletions(-) diff --git a/scripts/fetch_grsecurity_test.pl b/scripts/fetch_grsecurity_= test.pl deleted file mode 100755 index 2211b63..0000000 --- a/scripts/fetch_grsecurity_test.pl +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/perl -w - -# Fetches new released patches, tarballs, etc that have been -# announced on a web page and stores them locally. -# -# Copyright (C) 2010, Anthony G. Basile -# Released under the GPLv2 - -use strict ; -use LWP::Simple ; ; -use HTML::LinkExtor ; - -############################################################ -### Edit these to suit your needs ########################## -############################################################ - -my $storage_dir =3D "/home/basile/storage/grsecurity-test" ; -my $upstream_url =3D "http://grsecurity.net/test.php" ; -my @allowed_suffixes =3D ( ".patch", ".patch.sig", ".tar.gz", ".tar.gz.s= ig", ".asc" ) ; - -############################################################ - -my $send_email =3D 1 ; # do you want to send email alerts - -my $sendmail =3D "/usr/sbin/sendmail -t" ; - -my $from =3D "From: " . "root\@opensource.dyc.edu\n" ; -my $subject =3D "Subject: " . "New release from $upstream_url\n" ; -my $reply_to =3D "Reply-to: " . "devnull\@localhost.invalid\n" ; -my $send_to =3D "To: " . "basile\@opensource.dyc.edu\n" ; - -############################################################ - -my %already_retrieved =3D () ; #set of already retreived files -my %currently_available =3D () ; #set of currently available files - - -sub sane -{ - my ( $name ) =3D @_ ; - - return 0 if $name eq "" ; # no empty names - return 0 if $name =3D~ / / ; # no blanks in names - - my $got_suffix =3D 0 ; # file must have legitimate suffix - foreach my $suffix ( @allowed_suffixes ) - { - $got_suffix =3D 1 if $name =3D~ /$suffix$/ ; - } - - return $got_suffix ; -} - - -sub get_already_retrieved -{ - if ( -d $storage_dir ) # check if storage_dir exists - { - my @file_names =3D `ls $storage_dir` ; # and get list of files - foreach my $file_name ( @file_names ) - { - chomp( $file_name ) ; - $already_retrieved{ $file_name } =3D 1 if sane( $file_name ) ; - } - } - else # else create a new storage_dir - { - mkdir $storage_dir || die "Sorry I can't make $storage_dir\n" ; - print "\n\nCreated storage dir: $storage_dir\n\n" ; - } - -} - - -sub print_already_retrieved -{ - print "\n\nAlready retrieved files from upstream:\n\n" ; - foreach my $file_name ( sort keys %already_retrieved ) # go through ha= sh of already_retrieved files - { - print "\t$file_name\n" ; # and print - } - print "\n\n" ; -} - - -sub get_currently_available -{ - my $parser ; - my @links ; - - $parser =3D HTML::LinkExtor->new( undef, $upstream_url ) ; # grab upstr= eam web page - $parser->parse( get( $upstream_url ) )->eof ; - - @links =3D $parser->links ; # grab the links out of it - - foreach my $ref ( @links ) - { - my $file_url =3D ${$ref}[2] ; # get just the url part - my $file_name =3D $file_url ; - $file_name =3D~ s/^.*\/(.*)$/$1/ ; # parse out the file name from th= e url - - next unless sane( $file_name ) ; # if it fits the sane file names - - $currently_available{ $file_name } =3D $file_url ; # insert it and its= url as key=3D>value in currently_available - } -} - - -sub print_currently_available -{ - print "\n\nCurrently available files from upstream:\n\n" ; - foreach my $file_name ( sort keys %currently_available ) # go through h= ash of currently_available files - { - my $file_url =3D $currently_available{$file_name} ; - print "\t$file_name\n" ; # and print - #print "\t$file_name @ $file_url\n" ; - } - print "\n\n" ; -} - - -sub download_newly_available -{ - my $downloads =3D "" ; - - chdir( $storage_dir ) ; - foreach my $file_name ( sort keys %currently_available ) # go through e= ach of the currently_available files - { - next if $already_retrieved{ $file_name } ; # and if its not in the al= ready_retrieved - print "\tDownloading $file_name ... " ; - my $file_url =3D $currently_available{ $file_name } ; - if ( getstore( $file_url, $file_name ) ) # download it and report suc= cess/failure - { - print "OK\n" ; - $downloads .=3D "\t$file_name\n" ; - } - else - { - print "FAIL\n" ; - } - } -=09 - return $downloads ; -} - - -sub print_successful_downloads -{ - my ( $downloads ) =3D @_ ; - - if( $downloads ne "" ) - { - print "\n\nSuccessfully downloaded files from upstream:\n\n" ; - print $downloads ; - print "\n\n" ; - } - else - { - print "\n\nNo files downloaded from upstream --- nothing to report.\n\= n" ; - print "\n\n" ; - } -} - - -sub email_successful_downloads -{ - my ( $downloads ) =3D @_ ; - - if( $send_email =3D=3D 1 && $downloads ne "" ) - { - print "\n\nEmailing notification of successfully downloaded files $sen= d_to.\n\n" ; - - my $content =3D "\n\nSuccessfully downloaded files from upstream:\n\n"= ; - $content .=3D $downloads ; - $content .=3D "\n\n" ; - - open (SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; - print SENDMAIL $from ; - print SENDMAIL $subject ; - print SENDMAIL $reply_to ; - print SENDMAIL $send_to; - print SENDMAIL "Content-type: text/plain\n\n"; - print SENDMAIL $content; - close(SENDMAIL);=20 - } - else - { - print "\n\nNo files downloaded from upstream --- nothing to email.\n\n= " ; - print "\n\n" ; - } -} - - -sub main -{ - get_already_retrieved() ; - print_already_retrieved() ; - - get_currently_available() ; - print_currently_available() ; - - my $downloads =3D download_newly_available() ; - - print_successful_downloads( $downloads ) ; - email_successful_downloads( $downloads ) ; -} - -main() ; - diff --git a/scripts/mk.rsbac.patch.sh b/scripts/mk.rsbac.patch.sh index 485f179..c929387 100755 --- a/scripts/mk.rsbac.patch.sh +++ b/scripts/mk.rsbac.patch.sh @@ -25,7 +25,7 @@ sanity() { sanity =20 HGPV=3D"${KERNEL_VER}-${HGPV_PATCH}" -HGPV_TARBALL=3D"hardened-rsbac-patches-${HGPV}.extras.tar.bz2" +HGPV_TARBALL=3D"rsbac-patches-${HGPV}.extras.tar.bz2" =20 $TAR jcvf ${HGPV_TARBALL} ${KERNEL_VER} =20