1 / 29

Week Six Agenda

Week Six Agenda. Announcements Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines Lab assistance, questions and answers. Link of the week. http://en.wikipedia.org/wiki/Computer_security

pia
Download Presentation

Week Six Agenda

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week Six Agenda • Announcements • Link of the week • Review week four lab assignment • This week’s expected outcomes • Next lab assignment • Break-out problems • Upcoming deadlines • Lab assistance, questions and answers

  2. Link of the week http://en.wikipedia.org/wiki/Computer_security This article describes how security can be achieved through design and engineering http://en.wikipedia.org/wiki/Secure_Computing Firewalls, Safe Word authentication products, Internet filtering products like Smart Filter, Bess, and Webwasher

  3. Link of the week • Define: Trusted System • Define: Trusted Computing • Where are trusted systems utilized? • How are trusted systems utilized?

  4. Review week five lab assignment

  5. Review week five lab assignment • Define a makefile • Comments within a makefile (#) • makefile continuation lines (\) • Rule tells make both when and how to make a file • Dependency Line is a line with a colon (:) test_build.sh contains the make command which calls the makefile • Demonstrate makefile script under ~dandrear/temp (Einstein)

  6. Review week five lab assignment What is the makefile utility used for? Other software products that perform similar bundling operations - ANT developed by Apache Jakarta - ANT2 supplied from the Free Software Foundation which is part of Red Hat. What is a dependency between source files? main.cpp  employee.cpp  address.cpp What are the two parts of a dependency rule? 1) What files a file is dependent on 2) Rule that tells how to recompile the file What are the differences between a makefile and a shell script? The rules in a makefile are executed based on dependency, and not sequential order. Scripts execute in sequential order.

  7. Review week five lab assignment Target : Dependencies (prerequisites) <tab> Rule prog: a.o b.o c.o g++ a.o b.o c.o -ly –o prog a.o: prog.h a.c g++ –c prog.h a.c b.o: prog.h b.c g++ –c prog.h b.c c.o: c.c g++ –c c.c c.c: c.y yacc c.y mv y.tab.c c.c

  8. Review week five lab assignment

  9. Review week five lab assignment

  10. Review week five lab assignment Key Points About Makefile • Makefile recompiles all source files for a project. • Makefile only recompiles files that have been changed. • Bottom up control flow • Rules may be complex shell commands

  11. Review week five lab assignment Key Points About Perl • Dynamic typing • Dynamic allocation of memory for arrays and hash tables • Both procedural and object oriented programming capabilities • Rich third party software and use of modules

  12. Review week five lab assignment • Regular expression (a.k.a. regex or regexp) Is a pattern that describes a certain amount of text. A basic regular expression could be the single character, e.g.: a Jane is a women. It will match the first occurrence in the string. If succeeding matches are desired, the regex engine must be instructed to do so.

  13. Review week five lab assignment • Perl Hash table is an unordered set of scalars, accessed by some string value that is associated with each scalar. %colormap=( “12” => “gray”, “19” => “black”, “30” => “red”,); %colormap = (“12”, “gray”, “19”, “black”, “30”, “red”);

  14. Review week five lab assignment

  15. Week six expected outcomes Upon successful completion of this module, the student will be able to: • Create makefile scripts for software programs. • Use pattern rules in make files. • Create an effective PowerPoint presentation. • Create make files with multiple targets. • Install software packages on a server.

  16. Next lab assignment Installing software under UNIX is not always straightforward and easy. System administrators must be familiar with the layout of the file system. During a software installation, the possibility exists that the system could panic and/or have a hard disk failure.

  17. Next lab assignment Installation Software Package Methods Package manager - What are the tasks of a package manager? - The version of UNIX dictates which package manager will be used. - Many Linux versions utilize the Debian Package Manager. Manual - The utilization of makefiles or shell scripts to automate the install as much as possible. - Many times the installation of software is done by sending the source code to the site. - What steps are required to install a new software version? - How is a “configure” script utilized?

  18. Next lab assignment Assignment number: 5-1 test scenarios Command line: ./listdir.pl Command line: ./listdir -l Command line: ./listdir -l -d <directory> Command line: ./listdir -d <directory>

  19. Next Lab Assignment $dirLoc="."; # Default to current working directory for ($a=0;$a<=$#ARGV;$a++) { # Verify that the option is a “d” if ($ARGV[$a] eq “XXXX") { $dir=1; if (-d $ARGV[$XXXX]) { # Assign the second argument (directory) to a variable $dirLoc=$ARGV[$XXXX]; } else { $errorDir=1; } # Verify that the option is a “l” } elsif ($ARGV[$a] eq “XXXX") { $long=1; } }

  20. Next Lab Assignment # Open the directory that was assigned to # $dirLoc variable opendir(XXXX, "$dirLoc") || die "Cannot open directory.\n"; # Assign all file names to array @unfiles=readdir(XXXX); $z=1; # Sort file names in ascending order @files = sort { uc($a) cmp uc($b) } @XXXX;

  21. Next Lab Assignment foreach $file (@files) { if (-f "$dirLoc/$file") { if ($long) { if ($z==1) { printf("%-30s%10s%10s%10s\n","File Name","Size","User","Group"); } ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat "$dirLoc/$file"; $group=getgrgid($gid); $user=getpwuid($uid); printf(“%30s%10.f%10s%10s\n”, $file,$size,$user, $group); printf("%30s%10.f%10s%10s\n", $file,$siz e,$user,$group); } elsif ($nolong) { $printFiles.="$XXXX, "; } else {

  22. Next Lab Assignment if ($z==1) { printf("File Name\n"); } print "$file\n"; } $z++; } }

  23. Next Lab Assignment if ($nolong) { chop($printFiles); print "$printFiles\n"; } closedir DIR;

  24. Next Lab Assignment shell Assembler Kernel Firmware Hardware

  25. Next lab assignment • Demonstrate: Execute Fall08_solutions/listdir.pl script

  26. Break-out problems • touch command • dot command • dot dot command • What function does the makefile provide a project? • What are the two parts of a dependency rule? • What language is used for writing makefile rules? • What two methods are used for installing software packages? • What is a regular expression • American National Standard Institute (ANSI)

  27. Upcoming deadlines • Mid-Term review (True/False, Multiple choice) • Mid-term exam dates 2/19/09. • makefile Exercise, 6-1 is due 2/22/09. Create the specified files referred to in Lab Assignment 6-1. • Programming Assignment 1, 5-1 is due 10/28/08. • Installation Exercise, 8-1 is due 11/4/08.

  28. Questions and answers • Questions • Comments • Concerns • Are there questions regarding the mid-term outline? • After class I will help students with their scripts.

More Related