Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4015DA50.2040507@tagnet.ru>
Date: Tue, 27 Jan 2004 08:26:08 +0500
From: Boris Kovalenko <boris@...net.ru>
To:  popa3d-users@...ts.openwall.com
Subject: Re: Compile Problems

Hello, Doug!

    Again, You have not read comments for standalone mode in params.h
/*
* Should the command line options be supported?
* If enabled, popa3d will default to inetd mode
and will require a -D
* to actually enable the standalone mode.
*/

So You need just run popa3d -D

Regards,
    Boris

Doug Jolley wrote:

> Hi --
>
> I have been tearing my hair out trying to re-compile popa3d from 
> Slackware 9.0 source code.
> The compile process seems to go well.  My resultant executable is 
> 22864 bytes in size while
> Slackware's is 22856.  (I'm not sure that means a whole lot; but, I 
> just thought I'd toss it out.)
> The real problem is that when I try to talk to the executable using nc 
> (i.e. 'nc localhost 110')
> it talks to me when I use the Slackware version (i.e., I get a '+OK' 
> response).  However, with
> my version it just silently returns to the command prompt.
>
> I'm appending my params.h and Makefile.  If anyone could offer a 
> suggestion as to what I
> might be doing wrong, I'd be eternally grateful.  Thanks for any input.
>
>       ... doug
> - - - - - - - - - - - - - - - - - - - - - - - - -
>                   params.h
> - - - - - - - - - - - - - - - - - - - - - - - - -
> /*
> * Global POP daemon parameters.
> */
>
> #ifndef _POP_PARAMS_H
> #define _POP_PARAMS_H
>
> /*
> * Our name to use when talking to various
> interfaces.
> */
> #define POP_SERVER            "popa3d"
>
> /*
> * Are we going to be a standalone server or start
> via an inetd clone?
> */
> #define POP_STANDALONE            1
>
> #if POP_STANDALONE
>
> /*
> * Should the command line options be supported?
> * If enabled, popa3d will default to inetd mode
> and will require a -D
> * to actually enable the standalone mode.
> */
> #define POP_OPTIONS            1
>
> /*
> * The address and port to listen on.
> */
> #define DAEMON_ADDR            "0.0.0.0"    /* INADDR_ANY */
> #define DAEMON_PORT            110
>
> /*
> * Should libwrap be used?
> *
> * This may make things slower and also adds to
> code running as root,
> * so it is recommended that you use a packet
> filter instead. This
> * option is provided primarily as a way to meet
> conventions of certain
> * systems where all services obey libwrap access
> controls.
> */
> #define DAEMON_LIBWRAP            0
>
> #if DAEMON_LIBWRAP
> /*
> * How do we talk to libwrap?
> */
> #define DAEMON_LIBWRAP_IDENT        POP_SERVER
> #endif
>
> /*
> * Limit the number of POP sessions we can handle
> at a time to reduce
> * the impact of connection flood DoS attacks.
> */
> #define MAX_SESSIONS            100
> #define MAX_SESSIONS_PER_SOURCE        10
> #define MAX_BACKLOG            5
> #define MIN_DELAY            10
>
> #endif
>
> /*
> * Do we want to support virtual domains?
> */
> #define POP_VIRTUAL            0
>
> #if POP_VIRTUAL
>
> /*
> * VIRTUAL_HOME_PATH is where the virtual domain
> root directories live.
> */
> #define VIRTUAL_HOME_PATH        "/vhome"
>
> /*
> * Subdirectories within each virtual domain root
> for the authentication
> * information and mailboxes, respectively. These
> defaults correspond to
> * full pathnames of the form
> "/vhome/IP/{auth,mail}/username".
> */
> #define VIRTUAL_AUTH_PATH        "auth"
> #define VIRTUAL_SPOOL_PATH        "mail"
>
> /*
> * Do we want to support virtual domains only?
> Normally, if the connected
> * IP address doesn't correspond to a directory in
> VIRTUAL_HOME_PATH, the
> * authentication will be done globally.
> */
> #define VIRTUAL_ONLY            0
>
> #else
>
> /*
> * We don't support virtual domains
> (!POP_VIRTUAL), so we're definitely
> * not virtual-only. Don't edit this.
> */
> #define VIRTUAL_ONLY            0
>
> #endif
>
> /*
> * A pseudo-user to run as before authentication.
> The user and its UID
> * must not be used for any other purpose.
> */
> #define POP_USER            POP_SERVER
>
> /*
> * An empty directory to chroot to before
> authentication. The directory
> * and its parent directories must not be writable
> by anyone but root.
> */
> #define POP_CHROOT            "/var/empty"
>
> /*
> * Sessions will be closed if idle for longer than
> POP_TIMEOUT seconds.
> * RFC 1939 says that "such a timer MUST be of at
> least 10 minutes'
> * duration", so I've made 10 minutes the default.
> In practice, you
> * may want to reduce this to, say, 2 minutes.
> */
> #define POP_TIMEOUT            (10 * 60)
>
> /*
> * Do we want to support the obsolete LAST
> command, as defined in RFC
> * 1460? It has been removed from the protocol in
> 1994 by RFC 1725,
> * and isn't even mentioned in RFC 1939. Still,
> some software doesn't
> * work without it.
> */
> #define POP_SUPPORT_LAST        1
>
> /*
> * Introduce some sane limits on the mailbox size
> in order to prevent
> * a single huge mailbox from stopping the entire
> POP service.
> */
> #define MAX_MAILBOX_MESSAGES        200000
> #define MAX_MAILBOX_OPEN_BYTES        200000000
> #define MAX_MAILBOX_WORK_BYTES        250000000
>
> #if !VIRTUAL_ONLY
>
> /*
> * Choose the password authentication method your
> system uses:
> *
> * AUTH_PASSWD        Use getpwnam(3) only, for *BSD or
> readable passwd;
> * AUTH_SHADOW        Use shadow passwords directly (not
> via PAM);
> * AUTH_PAM        Use PAM in the old-fashioned way;
> * AUTH_PAM_USERPASS    Talk to pam_userpass via
> Linux-PAM binary prompts.
> *
> * Note that there's no built-in password aging
> support.
> */
> #define AUTH_PASSWD            0
> #define AUTH_SHADOW            1
> #define AUTH_PAM            0
> #define AUTH_PAM_USERPASS        0
>
> #if AUTH_PAM || AUTH_PAM_USERPASS
> #define AUTH_PAM_SERVICE        POP_SERVER
> #endif
>
> #endif
>
> #if POP_VIRTUAL || AUTH_PASSWD || AUTH_SHADOW
>
> /*
> * A salt used to waste some CPU time on dummy
> crypt(3) calls and make
> * it harder (but still far from impossible, on
> most systems) to check
> * for valid usernames. Adjust it for your
> crypt(3).
> */
> #define AUTH_DUMMY_SALT            "xx"
>
> #endif
>
> /*
> * Message to return to the client when
> authentication fails. You can
> * #undef this for no message.
> */
> #define AUTH_FAILED_MESSAGE        "Authentication
> failed (bad password?)"
>
> #if !VIRTUAL_ONLY
>
> /*
> * Your mail spool directory. Note: only local
> (non-NFS) mode 775 mail
> * spools are currently supported.
> *
> * #undef this for qmail-style $HOME/Mailbox
> mailboxes.
> */
> #define MAIL_SPOOL_PATH            "/var/mail"
>
> #ifndef MAIL_SPOOL_PATH
> /*
> * The mailbox file name relative to the user's
> home directory.
> */
> #define HOME_MAILBOX_NAME        "Mailbox"
> #endif
>
> #endif
>
> /*
> * Locking method your system uses for user
> mailboxes. It is important
> * that you set this correctly.
> *
> * *BSDs use flock(2), others typically use
> fcntl(2).
> */
> #define LOCK_FCNTL            1
> #define LOCK_FLOCK            0
>
> /*
> * How do we talk to syslogd? These should be fine
> for most systems.
> */
> #define SYSLOG_IDENT            POP_SERVER
> #define SYSLOG_OPTIONS            LOG_PID
> #define SYSLOG_FACILITY            LOG_DAEMON
> #define SYSLOG_PRI_LO            LOG_INFO
> #define SYSLOG_PRI_HI            LOG_NOTICE
> #define SYSLOG_PRI_ERROR        LOG_CRIT
>
> /*
> * There's probably no reason to touch anything
> below this comment.
> */
>
> /*
> * According to RFC 1939: "Keywords and arguments
> are each separated by
> * a single SPACE character. Keywords are three or
> four characters long.
> * Each argument may be up to 40 characters long."
> We're only processing
> * up to two arguments, so it is safe to truncate
> after this length.
> */
> #define POP_BUFFER_SIZE            0x80
>
> /*
> * There's no reason to change this one either.
> Making this larger would
> * waste memory, and smaller values could make the
> authentication fail.
> */
> #define AUTH_BUFFER_SIZE        (2 * POP_BUFFER_SIZE)
>
> #if POP_VIRTUAL
>
> /*
> * Buffer size for reading entire per-user
> authentication files.
> */
> #define VIRTUAL_AUTH_SIZE        0x100
>
> #endif
>
> /*
> * File buffer sizes to use while parsing the
> mailbox and retrieving a
> * message, respectively. Can be changed.
> */
> #define FILE_BUFFER_SIZE        0x10000
> #define RETR_BUFFER_SIZE        0x8000
>
> /*
> * The mailbox parsing code isn't allowed to
> truncate lines earlier than
> * this length. Keep this at least as large as the
> longest header field
> * name we need to check for, but not too large
> for performance reasons.
> */
> #define LINE_BUFFER_SIZE        0x20
>
> #endif
>
> - - - - - - - - - - - - - - - - - - - - - - - - -
>                      Makefile
> - - - - - - - - - - - - - - - - - - - - - - - - -
> CC = gcc
> LD = gcc
> RM = rm -f
> MKDIR = mkdir -p
> INSTALL = install
> CFLAGS = -c -Wall -O2 -fomit-frame-pointer
> # You may use OpenSSL's MD5 routines instead of
> the ones supplied here
> #CFLAGS += -DHAVE_OPENSSL
> LDFLAGS = -s
> LIBS =
> # Linux with glibc, FreeBSD, NetBSD
> LIBS += -lcrypt
> # HP-UX trusted system
> #LIBS += -lsec
> # Solaris (POP_STANDALONE, POP_VIRTUAL)
> #LIBS += -lsocket -lnsl
> # PAM
> #LIBS += -lpam
> # TCP wrappers
> LIBS += -lwrap
> # libwrap may also want this
> LIBS += -lnsl
> # OpenSSL (-DHAVE_OPENSSL)
> #LIBS += -lcrypto
>
> DESTDIR =
> PREFIX = /usr/local
> SBINDIR = $(PREFIX)/sbin
> MANDIR = $(PREFIX)/man
>
> PROJ = popa3d
> OBJS =     version.o     startup.o     standalone.o
> virtual.o     auth_passwd.o auth_shadow.o auth_pam.o
> pop_root.o pop_auth.o pop_trans.o     protocol.o
> database.o mailbox.o     misc.o     md5/md5.o
>
> all: $(PROJ)
>
> popa3d: $(OBJS)
> $(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o popa3d
>
> md5/md5.o: md5/md5.c md5/md5.h
> $(CC) $(CFLAGS) md5/md5.c -o md5/md5.o
>
> .c.o:
> $(CC) $(CFLAGS) $*.c
>
> install: $(PROJ)
> $(MKDIR) -m 755 $(DESTDIR)$(SBINDIR)
> $(DESTDIR)$(MANDIR)/man8
> $(INSTALL) -m 700 popa3d $(DESTDIR)$(SBINDIR)/
> $(INSTALL) -m 644 popa3d.8
> $(DESTDIR)$(MANDIR)/man8/
>
> remove:
> $(RM) $(DESTDIR)$(SBINDIR)/popa3d
> $(DESTDIR)$(MANDIR)/man8/popa3d.8
>
> clean:
> $(RM) $(PROJ) $(OBJS)
>
> _________________________________________________________________
> High-speed users≈be more efficient online with the new MSN Premium 
> Internet Software. 
> http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
>
>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.