|
From: Harris, R. <ha...@ta...> - 2002-05-09 01:19:13
|
Hi Andrew,
Responses in line.
Richard.
-----Original Message-----
From: Andrew McGlashan [mailto:ae...@bi...]
Sent: Thursday, 9 May 2002 10:45 AM
To: Harris, Richard
Cc: Bill Lucas; Mario Piazzese
Subject: Fw: SEWL passwdsecure -- other note
Importance: High
Richard,
I have made this email high priority as SE Water has a number of uses that
will need to use the passwdsecure tool. Bill has even suggested that I be
listed as a maintainer to try to progress this quicker; I would really like
some more help.
<<<
I haven't got a problem making you a maintainer if you want.
>>>
Okay, I have looked at FILECMP again -- I broke it with my former MD5CHECK
works. I have since re-worked that but I still have some problems. The
FILEICMP looks okay after all, although I haven't actually tested it; I
didn't look at it closely enough to understand it before.
The problem I am having now with the re-worked FILECMP / MD5CHECK section
having been done has to do with the getPsinfo function; it is dropping out
without completing all checks. I don't know why it dumps out, but here is
the statement that is failing:
sizeRead = fread(buf+sizeReadTotal, 1, sizeof(psinfo_t)-sizeReadTotal,
fileinfo);
Other information (from the non-Linux code):
> Checking file types / sizes...
>
> int sizeRead /* always 336 if successful */
> int sizeReadTotal /* always 0 */
>
>
> unsigned char buf[sizeof(psinfo_t)]
>
Now it fails after a number of iterations. I did remove a single check from
one require group and it got through to an additional require group. I was
going to include the output file with the debug information, but I don't
have it with me right now. Let me know if you need it and I will endeavour
to get it to you.
<<<
When you say it fails, do you mean it crashes or it fails to read the info?
I think I might need the debug info to get a better picture of what is going
on.
>>>
I did adjust the following in the getPsinfo function:
from FILE* fileinfo;
to FILE *fileinfo;
I assume that was simply a typo.
<<<
In general you should always use
FILE* fileinfo;
rather than
FILE *fileinfo;
as it seperates the type from the variable name. The type is FILE* (a
pointer to a FILE) and the variable is fileinfo. This distinction is
not as clear in the second instance. They both compile to the same
code but most modern style guides will recomend you use the first version.
>>>
The change didn't help or seem to effect
anything. I also made sure that every fopen had an fclose; I thought that
maybe there were too many files open or something like that. Maybe there is
still something in this as it was quite late when I packed it in last night.
<<<
I was thinking that also, but it doesn't seem to be the case. The ideal
solution would be to "truss" the process (solaris command that traces
system calls) but this may be non-trivial as it will require a special
configuration file that lets the passwdsecure command be called from.
If we could get the truss output that would probably point us in the
right direction.
>>>
The Makefile in the attached source has a DEBUG entry added to the CFLAGS
line, so it always makes the debug version for now. My 'do_conf' doesn't
include the MD5 directory, however, it uses the found OpenSSL libraries and
thus the configure defines USE_MD5.
AndrewM
Andrew McGlashan AACS
Director
Mobile: 04 2574 1827
Affinity Vision Australia Pty Ltd
ABN 91 099 273 855
This message contains privileged and confidential information intended only
for the use of the addressee named above. If you are not the intended
recipient of this message you are hereby notified that you must not
disseminate, copy or take any action in reliance on it. If you have
received this message in error please notify Affinity Vision Australia Pty
Ltd at ae...@bi... Any views expressed in this message are those of the
individual sender, except where the sender specifically states them to be
the views of Affinity Vision Australia Pty Ltd
----- Original Message -----
From: <And...@se...>
To: <ae...@bi...>
Sent: Thursday, May 09, 2002 1:12 AM
Subject: SEWL passwdsecure -- other note
>
> The following statement fails consistently for unknown reasons.....,
> but only after so many reads...
>
> sizeRead = fread(buf+sizeReadTotal, 1, sizeof(psinfo_t)-sizeReadTotal,
> fileinfo);
>
>
> Checking file types / sizes...
>
> int sizeRead /* always 336 if successful */
> int sizeReadTotal /* always 0 */
>
>
> unsigned char buf[sizeof(psinfo_t)]
>
***********************************************************************************
The information in this e-mail message and any files transmitted with it
are intended to be confidential and for the use of only the individual or
entity to whom they are addressed. The message and files may be
protected by legal professional privilege, or other legal rules. The
confidentiality of and privilege applying to this message and
files is not waived if this message or files has been sent to you by mistake.
If the reader of this message or files is not the intended recipient, you are
notified that retention, distribution or copying of this message and files are
strictly prohibited. If you receive this message or files in error, please
notify us immediately by telephone or return e-mail and delete all copies
from your computer system. It is the recipient's responsibility to check this
message and files for viruses.
Thank you.
***********************************************************************************
|