Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 25 22:36:07 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mAQ6a7pF020518 for ; Tue, 25 Nov 2008 22:36:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mAQ6YuIY018351 for ; Tue, 25 Nov 2008 22:34:56 -0800 Message-Id: <200811260634.mAQ6YuIY018351@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: random password Date: Tue, 25 Nov 2008 22:34:56 -0800 From: Bill Cheng Someone wrote: > The grading guidelines has the following: > > delete FileName=chess.jpg SHA1=f7917fe4976d2c24f225bc4b6c2334e554b91c28 > Nonce=8ae005585be9c44ef1910d25dd6f8da58c432ab5 > should prompt the user to see if it's okay to > use a random password, type "yes" > > In this, the filename and sha1 will match but the nonce will not match. So > should it still prompt for a random password? or should it warn the user of > a typo? If there is no such file that matches FileName, SHA1, *and* Nonce, then you should not prompt and just tell the user that there is no such file on this node. So, it looks like the grading guidelines is saying that you should prompt. So, the grading guidelines seem to have a bug! As I've mentioned before, the grading guidelines may have bugs with the one-time password stuff and you should tell me about bugs as soon as possible! Anyway, this test won't work in section (A.1.*) since there is only one node in the system. So I have to move it to (A.2.a). As a result, the corresponding 2 points have been moved to (A.1.a) to (A.2.a). Sorry about the late change in the grading guidelines! -- Bill Cheng // bill.cheng@usc.edu On Tue, Nov 25, 2008 at 9:04 PM, Bill Cheng wrote: > > Someone wrote: > > > Continuing from your answer below: > > have a nonce index, so I first check the nonce index and then verify the > > sha1 and filename (using the indexes). In this case my code prints out "File > > with these details not found" > > Again, you don't need a nonce index. You can just use the > SHA1 index to locate a file number. Then you open the > metadata file for each file having the same SHA1 value > and check the FileName and Nonce. For every FileName and > Nonce that match the commandline, you check if a password > exists. > > If you cannot not find a file with the specified SHA1, > FileName, *and* Nonce, you can print out an error message > like you mentioned above. > > > Or should an error message be printed only when the sha1 and filename do not > > match? > > You mean the Nonce matched but SHA1 and FileName do not match? > Then it's the same situation since *all* 3 things must match. > -- > Bill Cheng // bill.cheng@usc.edu > > > > > test case: A > > > (+2 points) > > > delete FileName=chess.jpg > > > SHA1=f7917fe4976d2c24f225bc4b6c2334e554b91c28 > > > Nonce=8ae005585be9c44ef1910d25dd6f8da58c432ab5 > > > should prompt the user to see if it's okay > > to > > > use a random password, type "yes" > > > nothing should get deleted, > > > type "status files 1 00.out", look at > > "00.out", > > > there should still be two files > > > > > > say now if i enter some non-existant filename, > > > > > > SERVANT XXXXX> delete FileName=abcd.xyz SHA1=3a5f........ > > > should it prompt for random password? > > > > No. If you do not have a file that matches the FileName, > > you cannot even verify that the SHA1 you have entered is > > correct. So, don't need to prompt. Although you should > > print an error message because it may be just a typo. > > -- > > Bill Cheng // bill.cheng@usc.edu