Week Six Agenda

Post on 24-Jan-2016

27 views 0 download

description

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 Questions and answers. Link of the week. http://en.wikipedia.org/wiki/Computer_security - PowerPoint PPT Presentation

transcript

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•Questions and answers

Link of the weekhttp://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

Link of the week

• Define: Trusted System

• Define: Trusted Computing

• Where are trusted systems utilized?

• How are trusted systems utilized?

Review week five lab assignment

SourceFile

SourceFile

SourceFile

SourceFile

SourceFile

Object File

Object File

ObjectFile

Object File

ObjectFile

LinkerRuntimeLibrary

ExecutableProgram

Source/Object/Executable Drawing

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)

Review week five lab assignmentWhat 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.cppWhat are the two parts of a dependency rule? 1) What files a file is dependent on

2) Rule that tells how to recompile the fileWhat 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.

Review week five lab assignmentTarget : Dependencies (prerequisites)<tab> Rule

prog: a.o b.o c.o g++ a.o b.o c.o -ly –o proga.o: prog.h a.c g++ –c prog.h a.cb.o: prog.h b.c g++ –c prog.h b.cc.o: c.c

g++ –c c.cc.c: c.y

yacc c.ymv y.tab.c c.c

Review week five lab assignment

Review week five lab assignmentmyProgram

main.o employee.o address.o

employee.cppemployee.h main.cpp address.haddress.cpp

Review week five lab assignmentKey Points About Makefile

1. Makefile recompiles all source files for a project.

2. Makefile only recompiles files that have been changed.

3. Bottom up control flow

4. Rules may be complex shell commands

Review week five lab assignment

Key Points About Perl

1. Dynamic typing

2. Dynamic allocation of memory for arrays and hash tables

3. Both procedural and object oriented programming capabilities

4. Rich third party software and use of modules

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.

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”);

Review week five lab assignment

BLACK RED GRAY

YELLOW BLUE WHITE

GREEN AMBER GOLD PINK

11 12 13

21 22 23

31 343332

Hash Table

Week six expected outcomesUpon 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.

Next lab assignmentInstalling 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.

Next lab assignment

Installation Software Package MethodsPackage 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?

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>

Next Lab Assignment$dirLoc="."; # Default to current working directoryfor ($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; }}

Next Lab Assignment

# Open the directory that was assigned to# $dirLoc variableopendir(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;

Next Lab Assignmentforeach $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 {

Next Lab Assignmentif ($z==1) {

printf("File Name\n");

}

print "$file\n";

}

$z++;

}

}

Next Lab Assignmentif ($nolong) {

chop($printFiles);

print "$printFiles\n";

}

closedir DIR;

Next Lab Assignment

shell

Kernel

Hardware

Assembler

Firmware

Next lab assignment

• Demonstrate:

Execute Fall08_solutions/listdir.pl script

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)

Upcoming deadlines• Mid-Term review (True/False, Multiple

choice)

• Mid-term exam dates 10/20 – 25/08.

• makefile Exercise, 6-1 is due 10/21/08.

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.

Questions and answers

• Questions

• Comments

• Concerns

• Are there questions regarding the mid-term outline?

• After class I will help students with their scripts.