76 lines
2.3 KiB
Text
76 lines
2.3 KiB
Text
--- pop_init.c.orig Fri Jul 10 03:44:07 1998
|
|
+++ pop_init.c Mon Jul 30 19:29:00 2001
|
|
@@ -32,6 +32,11 @@
|
|
# include <strings.h>
|
|
#endif
|
|
|
|
+#ifdef OPIE
|
|
+#include <opie.h>
|
|
+extern int af_pwok;
|
|
+#endif /* OPIE */
|
|
+
|
|
#ifndef HAVE_INDEX
|
|
# define index(s,c) strchr(s,c)
|
|
# define rindex(s,c) strrchr(s,c)
|
|
@@ -113,6 +118,10 @@
|
|
}
|
|
#endif /* KERBEROS */
|
|
|
|
+#ifdef OPIE
|
|
+ af_pwok = opieaccessfile(p->client);
|
|
+#endif /* OPIE */
|
|
+
|
|
return(POP_SUCCESS);
|
|
}
|
|
|
|
@@ -235,8 +244,8 @@
|
|
|
|
if ((p->trace = fopen(optarg,"a+")) == NULL) {
|
|
pop_log(p,POP_PRIORITY,
|
|
- "Unable to open trace file \"%s\", err = %d",
|
|
- optarg,errno);
|
|
+ "Unable to open trace file \"%s\": ",
|
|
+ optarg, strerror(errno));
|
|
exit(1);
|
|
}
|
|
trace_file_name = optarg;
|
|
@@ -266,7 +275,8 @@
|
|
len = sizeof(cs);
|
|
if (getpeername(sp,(struct sockaddr *)&cs,&len) < 0){
|
|
pop_log(p,POP_PRIORITY,
|
|
- "Unable to obtain socket and address of client, err = %d",errno);
|
|
+ "Unable to obtain socket and address of client: %s",
|
|
+ strerror(errno));
|
|
exit(1);
|
|
}
|
|
|
|
@@ -281,8 +291,8 @@
|
|
ch = gethostbyaddr((char *) &cs.sin_addr, sizeof(cs.sin_addr), AF_INET);
|
|
if (ch == NULL){
|
|
pop_log(p,POP_PRIORITY,
|
|
- "(v%s) Unable to get canonical name of client, err = %d",
|
|
- VERSION, errno);
|
|
+ "(v"VERSION") Unable to get canonical name of client %s: %s",
|
|
+ p->ipaddr, hstrerror(h_errno));
|
|
p->client = p->ipaddr;
|
|
}
|
|
/* Save the cannonical name of the client host in
|
|
@@ -360,14 +370,16 @@
|
|
/* Create input file stream for TCP/IP communication */
|
|
if ((p->input = fdopen(sp,"r")) == NULL){
|
|
pop_log(p,POP_PRIORITY,
|
|
- "Unable to open communication stream for input, err = %d",errno);
|
|
+ "Unable to open communication stream for input: ",
|
|
+ strerror(errno));
|
|
exit (1);
|
|
}
|
|
|
|
/* Create output file stream for TCP/IP communication */
|
|
if ((p->output = fdopen(sp,"w")) == NULL){
|
|
pop_log(p,POP_PRIORITY,
|
|
- "Unable to open communication stream for output, err = %d",errno);
|
|
+ "Unable to open communication stream for output: ",
|
|
+ strerror(errno));
|
|
exit (1);
|
|
}
|
|
|