LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-15-2024, 03:40 PM   #1
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 798

Rep: Reputation: 256Reputation: 256Reputation: 256
Exclamation popa3d: segfaults w/PAM


popa3d-1.0.3 has an option for PAM authentication, but it is not set correctly, resulting in a segfault when a user tries to login.

Code:
> telnet 192.168.20.1 110
Trying 192.168.20.1...
Connected to 192.168.20.1.
Escape character is '^]'.
+OK
USER jayjwa
+OK
PASS s3cr3t
-ERR Authentication failed (bad password?)
Connection closed by foreign host.

May 15 13:51:50 atr2 vmunix: [427685.241713] popa3d[32056]: segfault at fffffffff7f75220 ip 00007ffff7772307 sp 00007fffffffd578 error 5 in libc-2.39.so[7ffff7628000+16f000] likely on CPU 0 (core 0, socket 0)
May 15 13:51:50 atr2 vmunix: [427685.241728] Code: 48 01 d0 c5 f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 c4 41 01 ef ff 89 f8 09 f0 c1 e0 14 3d 00 00 00 f8 0f 87 29 03 00 00 <c5> fe 6f 07 c5 fd 74 0e c5 85 74 d0 c5 ed df c9 c5 fd d7 c9 ff c1
May 15 13:51:50 atr2 popa3d[32050]: Authentication failed for jayjwa
May 15 13:54:35 atr2 vmunix: [427849.918832] popa3d[32231]: segfault at fffffffff7f75220 ip 00007ffff7772307 sp 00007fffffffd578 error 5 in libc-2.39.so[7ffff7628000+16f000] likely on CPU 3 (core 1, socket 0)
May 15 13:54:35 atr2 vmunix: [427849.918845] Code: 48 01 d0 c5 f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 c4 41 01 ef ff 89 f8 09 f0 c1 e0 14 3d 00 00 00 f8 0f 87 29 03 00 00 <c5> fe 6f 07 c5 fd 74 0e c5 85 74 d0 c5 ed df c9 c5 fd d7 c9 ff c1
May 15 13:54:35 atr2 popa3d[32225]: Authentication failed for jayjwa
May 15 13:55:00 atr2 vmunix: [427874.637699] popa3d[32252]: segfault at fffffffff7f75220 ip 00007ffff7772307 sp 00007fffffffd578 error 5 in libc-2.39.so[7ffff7628000+16f000] likely on CPU 6 (core 5, socket 0)
May 15 13:55:00 atr2 vmunix: [427874.637714] Code: 48 01 d0 c5 f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 c4 41 01 ef ff 89 f8 09 f0 c1 e0 14 3d 00 00 00 f8 0f 87 29 03 00 00 <c5> fe 6f 07 c5 fd 74 0e c5 85 74 d0 c5 ed df c9 c5 fd d7 c9 ff c1
#define AUTH_PAM 1 should be set instead. Two of the patches against the original source apply clean, but the last does not, so I diff'd against the original.

zcat /tmp/popa3d-2024may05.patch.gz
Code:
diff -Nur popa3d-1.0.3.orig/Makefile popa3d-1.0.3/Makefile
--- popa3d-1.0.3.orig/Makefile	2006-03-05 05:36:54.000000000 -0500
+++ popa3d-1.0.3/Makefile	2024-05-15 16:04:45.441343266 -0400
@@ -3,28 +3,28 @@
 RM = rm -f
 MKDIR = mkdir -p
 INSTALL = install -c
-CFLAGS = -Wall -O2 -fomit-frame-pointer
+CFLAGS = -pipe -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
+LIBS += -lcrypt
 # HP-UX trusted system
 #LIBS += -lsec
 # Solaris (POP_STANDALONE, POP_VIRTUAL)
 #LIBS += -lsocket -lnsl
 # PAM
-#LIBS += -lpam
+LIBS += -lpam
 # TCP wrappers
 #LIBS += -lwrap
 # libwrap may also want this
 #LIBS += -lnsl
 # OpenSSL (-DHAVE_OPENSSL)
-#LIBS += -lcrypto
+LIBS += -lcrypto
 
 DESTDIR =
-PREFIX = /usr/local
+PREFIX = /usr
 SBINDIR = $(PREFIX)/sbin
 MANDIR = $(PREFIX)/man
 
diff -Nur popa3d-1.0.3.orig/params.h popa3d-1.0.3/params.h
--- popa3d-1.0.3.orig/params.h	2006-03-05 08:18:32.000000000 -0500
+++ popa3d-1.0.3/params.h	2024-05-15 16:06:37.097555265 -0400
@@ -103,7 +103,7 @@
  * 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
+#define POP_USER			"pop"
 
 /*
  * An empty directory to chroot to before authentication.  The directory
@@ -155,8 +155,8 @@
  * Note that there's no built-in password aging support.
  */
 #define AUTH_PASSWD			0
-#define AUTH_SHADOW			1
-#define AUTH_PAM			0
+#define AUTH_SHADOW			0
+#define AUTH_PAM			1
 #define AUTH_PAM_USERPASS		0
 #define USE_LIBPAM_USERPASS		0
 
@@ -191,7 +191,7 @@
  *
  * #undef this for qmail-style $HOME/Mailbox mailboxes.
  */
-#define MAIL_SPOOL_PATH			"/var/mail"
+#define MAIL_SPOOL_PATH			"/var/spool/mail"
 
 #ifndef MAIL_SPOOL_PATH
 /*
After...
Code:
> telnet 192.168.20.1 110
Trying 192.168.20.1...
Connected to 192.168.20.1.
Escape character is '^]'.
+OK
USER jayjwa
+OK
PASS s3cr3t
+OK
STAT
+OK 9 159760
QUIT
+OK
Connection closed by foreign host.
 
Old 05-16-2024, 03:28 PM   #2
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 796

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
From today's ChangeLog:
Quote:
Thu May 16 02:31:40 UTC 2024
...
n/popa3d-1.0.3-x86_64-8.txz: Rebuilt.
This is a bugfix release:
Build with AUTH_PAM, not AUTH_SHADOW.
Thanks to jayjwa.
...
 
  


Reply

Tags
pam, popa3d



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/pam.d/system-auth-ac vs. /etc/pam.d/password-auth-ac vs. /etc/pam.d/sshd christr Red Hat 2 08-01-2014 07:08 PM
popa3d domain setup SerfurJ Linux - Networking 1 01-20-2004 11:33 AM
popa3d collect2: ld returned 1 exit status datapunk Linux - Software 1 01-02-2004 06:48 PM
popa3d email download problem. Manuel-H Linux - Software 1 08-22-2003 05:18 AM
Help about setting up popa3d marcomas Slackware 0 07-29-2003 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration