[627] in Kerberos-V5-bugs
appl/popper and Solaris 2.3
daemon@ATHENA.MIT.EDU (John DiMarco)
Fri Aug 12 17:24:19 1994
From: John DiMarco <jdd@cdf.toronto.edu>
To: krb5-bugs@MIT.EDU
Date: Fri, 12 Aug 1994 17:23:52 -0400
I had to make the following changes to the krb5-beta4.2 appl/popper to
get it to compile under Solaris 2.3. Note: I haven't tried it.
appl/movemail and appl/mailquery don't compile either (they need to be
linked with -lsocket -lnsl, for example). I didn't bother fixing them.
Regards,
John
--
John DiMarco <jdd@cdf.toronto.edu> Office: EA201B
Computing Disciplines Facility Systems Manager Phone: 416-978-1928
University of Toronto Fax: 416-978-1931
http://www.cdf.toronto.edu/personal/jdd/jdd.html
*** /tmp/T0a002CR Fri Aug 12 17:18:12 1994
--- pop_enter.c Fri Aug 12 13:47:33 1994
***************
*** 47,53 ****
{
if(open_drop(argv[i]) < 0)
{
! lseek(newmail, 0, L_SET);
if(new_message(maildrop, newmail) < 0)
status = 1;
if(close(maildrop) < 0)
--- 47,53 ----
{
if(open_drop(argv[i]) < 0)
{
! lseek(newmail, 0, SEEK_SET);
if(new_message(maildrop, newmail) < 0)
status = 1;
if(close(maildrop) < 0)
***************
*** 115,121 ****
return(-1);
}
! lseek(maildrop, 0, L_XTND);
return(0);
}
--- 115,121 ----
return(-1);
}
! lseek(maildrop, 0, SEEK_END);
return(0);
}
*** /tmp/T0a002CR Fri Aug 12 17:18:12 1994
--- pop_init.c Fri Aug 12 14:24:08 1994
***************
*** 53,59 ****
int standalone = 0;
/* Initialize the POP parameter block */
! bzero ((char *)p,(int)sizeof(POP));
/* Save my name in a global variable */
p->myname = argmessage[0];
--- 53,59 ----
int standalone = 0;
/* Initialize the POP parameter block */
! memset (p,0, sizeof(POP));
/* Save my name in a global variable */
p->myname = argmessage[0];
***************
*** 210,216 ****
/* Look for the client's IP address in the list returned
for its name */
for (addrp=ch_again->h_addr_list; *addrp; ++addrp)
! if (bcmp(*addrp,&(cs.sin_addr),sizeof(cs.sin_addr)) == 0) break;
if (!*addrp) {
pop_log (p,POP_PRIORITY,
--- 210,216 ----
/* Look for the client's IP address in the list returned
for its name */
for (addrp=ch_again->h_addr_list; *addrp; ++addrp)
! if (memcmp(*addrp,&(cs.sin_addr),sizeof(cs.sin_addr)) == 0) break;
if (!*addrp) {
pop_log (p,POP_PRIORITY,
*** /tmp/T0a002CR Fri Aug 12 17:18:12 1994
--- pop_pass.c Fri Aug 12 14:23:31 1994
***************
*** 219,225 ****
if(!(fp = fopen(pwfile, "r")))
return(NULL);
! bzero(&p, sizeof(p));
while(fgets(buf, sizeof(buf), fp))
{
if(!(c = (char *) index(buf, ':')))
--- 219,225 ----
if(!(fp = fopen(pwfile, "r")))
return(NULL);
! memset (&p, 0, sizeof(p));
while(fgets(buf, sizeof(buf), fp))
{
if(!(c = (char *) index(buf, ':')))
*** /tmp/T0a002CR Fri Aug 12 17:18:13 1994
--- pop_updt.c Fri Aug 12 13:47:58 1994
***************
*** 104,110 ****
#endif
/* Go to the right places */
! offset = lseek((int)fileno(p->drop),0,L_XTND) ;
/* Append any messages that may have arrived during the session
to the temporary maildrop */
--- 104,110 ----
#endif
/* Go to the right places */
! offset = lseek((int)fileno(p->drop),0,SEEK_END) ;
/* Append any messages that may have arrived during the session
to the temporary maildrop */
***************
*** 125,131 ****
/* Synch stdio and the kernel for the POP drop */
rewind(p->drop);
! (void)lseek((int)fileno(p->drop),0,L_SET);
/* Transfer messages not flagged for deletion from the temporary
maildrop to the new maildrop */
--- 125,131 ----
/* Synch stdio and the kernel for the POP drop */
rewind(p->drop);
! (void)lseek((int)fileno(p->drop),0,SEEK_SET);
/* Transfer messages not flagged for deletion from the temporary
maildrop to the new maildrop */
***************
*** 228,234 ****
}
/* Go to start of new mail if any */
! (void)lseek((int)fileno(p->drop),offset,L_SET);
while((nchar=read((int)fileno(p->drop),buffer,BUFSIZ)) > 0)
if ( nchar != write(mfd,buffer,nchar) ) {
--- 228,234 ----
}
/* Go to start of new mail if any */
! (void)lseek((int)fileno(p->drop),offset,SEEK_SET);
while((nchar=read((int)fileno(p->drop),buffer,BUFSIZ)) > 0)
if ( nchar != write(mfd,buffer,nchar) ) {
*** /tmp/T0a002CR Fri Aug 12 17:18:13 1994
--- pop_xmit.c Fri Aug 12 14:04:20 1994
***************
*** 13,18 ****
--- 13,20 ----
#include <sys/types.h>
#include <sys/file.h>
#include <sys/wait.h>
+ #include <sys/stat.h>
+ #include <sys/fcntl.h>
#ifdef HAS_PATHS_H
#include <paths.h>
#endif
***************
*** 35,41 ****
char buffer[MAXLINELEN]; /* Read buffer */
char * temp_xmit; /* Name of the temporary
filedrop */
! union wait stat;
int id, pid;
/* Create a temporary file into which to copy the user's message */
--- 37,43 ----
char buffer[MAXLINELEN]; /* Read buffer */
char * temp_xmit; /* Name of the temporary
filedrop */
! int stat;
int id, pid;
/* Create a temporary file into which to copy the user's message */
***************
*** 92,98 ****
default:
while((id = wait(&stat)) >=0 && id != pid);
if (!p->debug) (void)unlink (temp_xmit);
! if (stat.w_retcode)
return (pop_msg(p,POP_FAILURE,"Unable to send message"));
return (pop_msg (p,POP_SUCCESS,"Message sent successfully"));
}
--- 94,100 ----
default:
while((id = wait(&stat)) >=0 && id != pid);
if (!p->debug) (void)unlink (temp_xmit);
! if (WEXITSTATUS(stat))
return (pop_msg(p,POP_FAILURE,"Unable to send message"));
return (pop_msg (p,POP_SUCCESS,"Message sent successfully"));
}
*** /tmp/T0a002CR Fri Aug 12 17:18:13 1994
--- popper.h Fri Aug 12 14:25:34 1994
***************
*** 179,181 ****
--- 179,184 ----
extern int pop_xtnd();
extern int pop_xmit();
+ #ifndef index
+ #define index strchr
+ #endif /* index */