Commit cfb7e728 cfb7e728be759f63987648acd08bf2f2e4ee85dc by Alain Magloire

forgot to move some functions pop3_xx() --> pop3d_xx()

1 parent 39dec3bc
AUTOMAKE_OPTIONS = ../lib/ansi2knr
INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/include
CFLAGS = -Wall -pedantic -ansi
CFLAGS = -Wall -ansi
sbin_PROGRAMS = imap4d
......
AUTOMAKE_OPTIONS = ../lib/ansi2knr no-dependencies
CFLAGS = -Wall -pedantic -g
CFLAGS = -Wall -g
INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/lib @ARGPINCS@
......
......@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = ../lib/ansi2knr
INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox/include \
-I${top_srcdir}/lib
CFLAGS = -Wall -pedantic -g
CFLAGS = -Wall -g
SUBDIRS = include
......
AUTOMAKE_OPTIONS = ../lib/ansi2knr
INCLUDES =-I$(srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/include
CFLAGS = -Wall -pedantic -g
CFLAGS = -Wall -g
sbin_PROGRAMS = pop3d
......
......@@ -271,13 +271,13 @@ pop3d_mainloop (int infile, int outfile)
if (state == TRANSACTION && !mailbox_is_updated (mbox))
{
static size_t mailbox_size;
size_t newsize = 0;
static off_t mailbox_size;
off_t newsize = 0;
mailbox_get_size (mbox, &newsize);
/* Did we shrink? */
if (!mailbox_size)
mailbox_size = newsize;
else (newsize < mailbox_size)
else if (newsize < mailbox_size)
pop3d_abquit (ERR_MBOX_SYNC);
}
......
......@@ -87,6 +87,7 @@
#include <sys/wait.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
#include <grp.h>
......
......@@ -24,7 +24,7 @@
and closes the TCP connection. */
int
pop3_quit (const char *arg)
pop3d_quit (const char *arg)
{
int err = OK;
if (strlen (arg) != 0)
......
......@@ -20,7 +20,7 @@
/* Prints out the specified message */
int
pop3_retr (const char *arg)
pop3d_retr (const char *arg)
{
size_t mesgno, n;
char *buf;
......@@ -51,7 +51,7 @@ pop3_retr (const char *arg)
off = n = 0;
buf = malloc (buflen * sizeof (*buf));
if (buf == NULL)
pop3_abquit (ERR_NO_MEM);
pop3d_abquit (ERR_NO_MEM);
while (stream_readline (stream, buf, buflen, off, &n) == 0
&& n > 0)
......@@ -64,7 +64,7 @@ pop3_retr (const char *arg)
buflen *= 2;
buf = realloc (buf, buflen * sizeof (*buf));
if (buf == NULL)
pop3_abquit (ERR_NO_MEM);
pop3d_abquit (ERR_NO_MEM);
continue;
}
if (buf[0] == '.')
......
......@@ -20,7 +20,7 @@
/* Resets the connection so that no messages are marked as deleted */
int
pop3_rset (const char *arg)
pop3d_rset (const char *arg)
{
size_t i;
size_t total = 0;
......
......@@ -19,7 +19,7 @@
#include "pop3d.h"
void
pop3_sigchld (int signo)
pop3d_sigchld (int signo)
{
pid_t pid;
int status;
......@@ -32,7 +32,7 @@ pop3_sigchld (int signo)
#ifndef HAVE_SIGACTION
/* On some system, signal implements the unreliabe sematic and
has to be rearm. */
signal (SIGCHLD, pop3_sigchld);
signal (SIGCHLD, pop3d_sigchld);
#endif
errno = old_errno;
}
......
......@@ -20,7 +20,7 @@
/* Prints the number of messages and the total size of all messages */
int
pop3_stat (const char *arg)
pop3d_stat (const char *arg)
{
size_t mesgno;
size_t size = 0;
......
......@@ -20,7 +20,7 @@
/* Prints the header of a message plus a specified number of lines. */
int
pop3_top (const char *arg)
pop3d_top (const char *arg)
{
size_t mesgno;
int lines;
......@@ -41,8 +41,8 @@ pop3_top (const char *arg)
if (state != TRANSACTION)
return ERR_WRONG_STATE;
mesgc = pop3_cmd (arg);
linesc = pop3_args (arg);
mesgc = pop3d_cmd (arg);
linesc = pop3d_args (arg);
mesgno = strtoul (mesgc, NULL, 10);
lines = strlen (linesc) > 0 ? strtol (linesc, NULL, 10) : -1;
free (mesgc);
......@@ -65,7 +65,7 @@ pop3_top (const char *arg)
header_get_stream (hdr, &stream);
buf = malloc (buflen * sizeof (*buf));
if (buf == NULL)
pop3_abquit (ERR_NO_MEM);
pop3d_abquit (ERR_NO_MEM);
off = n = 0;
while (stream_readline (stream, buf, buflen, off, &n) == 0
&& n > 0)
......@@ -98,7 +98,7 @@ pop3_top (const char *arg)
buflen *= 2;
buf = realloc (buf, buflen * sizeof (*buf));
if (buf == NULL)
pop3_abquit (ERR_NO_MEM);
pop3d_abquit (ERR_NO_MEM);
continue;
}
if (buf[0] == '.')
......
......@@ -18,7 +18,7 @@
#include "pop3d.h"
int
pop3_uidl (const char *arg)
pop3d_uidl (const char *arg)
{
size_t mesgno;
char uidl[128];
......
......@@ -77,7 +77,7 @@ static struct pam_conv PAM_conversation = { &PAM_gnupop3d_conv, NULL };
otherwise it will (likely) return ERR_BAD_LOGIN */
int
pop3_user (const char *arg)
pop3d_user (const char *arg)
{
char *buf, pass[POP_MAXCMDLEN], *tmp, *cmd;
struct passwd *pw;
......@@ -96,9 +96,9 @@ pop3_user (const char *arg)
fprintf (ofile, "+OK\r\n");
fflush (ofile);
buf = pop3_readline (ifile);
cmd = pop3_cmd (buf);
tmp = pop3_args (buf);
buf = pop3d_readline (ifile);
cmd = pop3d_cmd (buf);
tmp = pop3d_args (buf);
free (buf);
if (strlen (tmp) > POP_MAXCMDLEN)
......@@ -125,7 +125,7 @@ pop3_user (const char *arg)
#ifdef _USE_APOP
/* Check to see if they have an APOP password. If so, refuse USER/PASS */
tmp = pop3_apopuser (arg);
tmp = pop3d_apopuser (arg);
if (tmp != NULL)
{
syslog (LOG_INFO, "APOP user %s tried to log in with USER", arg);
......@@ -201,7 +201,7 @@ pam_errlab:
username = strdup (arg);
if (username == NULL)
pop3_abquit (ERR_NO_MEM);
pop3d_abquit (ERR_NO_MEM);
state = TRANSACTION;
if (pw != NULL && pw->pw_uid > 1)
......@@ -221,7 +221,7 @@ pam_errlab:
{
syslog (LOG_INFO, "Possible probe of account '%s'", arg);
free (cmd);
return pop3_quit (pass);
return pop3d_quit (pass);
}
free (cmd);
......