Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
cfb7e728
...
cfb7e728be759f63987648acd08bf2f2e4ee85dc
authored
2001-04-24 05:27:14 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
forgot to move some functions pop3_xx() --> pop3d_xx()
1 parent
39dec3bc
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
29 additions
and
28 deletions
imap4d/Makefile.am
mail/Makefile.am
mailbox/Makefile.am
pop3d/Makefile.am
pop3d/pop3d.c
pop3d/pop3d.h
pop3d/quit.c
pop3d/retr.c
pop3d/rset.c
pop3d/signal.c
pop3d/stat.c
pop3d/top.c
pop3d/uidl.c
pop3d/user.c
imap4d/Makefile.am
View file @
cfb7e72
AUTOMAKE_OPTIONS
=
../lib/ansi2knr
INCLUDES
=
-I
$(top_srcdir)
/lib -I
$(top_srcdir)
/include
CFLAGS
=
-Wall -
pedantic -
ansi
CFLAGS
=
-Wall -ansi
sbin_PROGRAMS
=
imap4d
...
...
mail/Makefile.am
View file @
cfb7e72
AUTOMAKE_OPTIONS
=
../lib/ansi2knr no-dependencies
CFLAGS
=
-Wall -
pedantic -
g
CFLAGS
=
-Wall -g
INCLUDES
=
-I
${
top_srcdir
}
/include -I
${
top_srcdir
}
/lib @ARGPINCS@
...
...
mailbox/Makefile.am
View file @
cfb7e72
...
...
@@ -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
...
...
pop3d/Makefile.am
View file @
cfb7e72
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
...
...
pop3d/pop3d.c
View file @
cfb7e72
...
...
@@ -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
);
}
...
...
pop3d/pop3d.h
View file @
cfb7e72
...
...
@@ -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>
...
...
pop3d/quit.c
View file @
cfb7e72
...
...
@@ -24,7 +24,7 @@
and closes the TCP connection. */
int
pop3_quit
(
const
char
*
arg
)
pop3
d
_quit
(
const
char
*
arg
)
{
int
err
=
OK
;
if
(
strlen
(
arg
)
!=
0
)
...
...
pop3d/retr.c
View file @
cfb7e72
...
...
@@ -20,7 +20,7 @@
/* Prints out the specified message */
int
pop3_retr
(
const
char
*
arg
)
pop3
d
_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
);
pop3
d
_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
);
pop3
d
_abquit
(
ERR_NO_MEM
);
continue
;
}
if
(
buf
[
0
]
==
'.'
)
...
...
pop3d/rset.c
View file @
cfb7e72
...
...
@@ -20,7 +20,7 @@
/* Resets the connection so that no messages are marked as deleted */
int
pop3_rset
(
const
char
*
arg
)
pop3
d
_rset
(
const
char
*
arg
)
{
size_t
i
;
size_t
total
=
0
;
...
...
pop3d/signal.c
View file @
cfb7e72
...
...
@@ -19,7 +19,7 @@
#include "pop3d.h"
void
pop3_sigchld
(
int
signo
)
pop3
d
_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
,
pop3
d
_sigchld
);
#endif
errno
=
old_errno
;
}
...
...
pop3d/stat.c
View file @
cfb7e72
...
...
@@ -20,7 +20,7 @@
/* Prints the number of messages and the total size of all messages */
int
pop3_stat
(
const
char
*
arg
)
pop3
d
_stat
(
const
char
*
arg
)
{
size_t
mesgno
;
size_t
size
=
0
;
...
...
pop3d/top.c
View file @
cfb7e72
...
...
@@ -20,7 +20,7 @@
/* Prints the header of a message plus a specified number of lines. */
int
pop3_top
(
const
char
*
arg
)
pop3
d
_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
=
pop3
d
_cmd
(
arg
);
linesc
=
pop3
d
_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
);
pop3
d
_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
);
pop3
d
_abquit
(
ERR_NO_MEM
);
continue
;
}
if
(
buf
[
0
]
==
'.'
)
...
...
pop3d/uidl.c
View file @
cfb7e72
...
...
@@ -18,7 +18,7 @@
#include "pop3d.h"
int
pop3_uidl
(
const
char
*
arg
)
pop3
d
_uidl
(
const
char
*
arg
)
{
size_t
mesgno
;
char
uidl
[
128
];
...
...
pop3d/user.c
View file @
cfb7e72
...
...
@@ -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
)
pop3
d
_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
=
pop3
d
_readline
(
ifile
);
cmd
=
pop3
d
_cmd
(
buf
);
tmp
=
pop3
d
_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
=
pop3
d
_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
);
pop3
d
_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
pop3
d
_quit
(
pass
);
}
free
(
cmd
);
...
...
Please
register
or
sign in
to post a comment