PAM Service Name Patch

Mark D. Roth roth+openssh at feep.net
Fri Feb 23 03:55:15 EST 2001


I've attached a patch relative to OpenSSH 2.5.1p1 which sets the
default PAM service name to __progname instead of the hard-coded value
"sshd".  This allows you to have multiple invokations of sshd under
different names, each with its own PAM configuration.

Please let me know if you have any questions or problems.

-- 
Mark D. Roth <roth at feep.net>
http://www.feep.net/~roth/
-------------- next part --------------
diff -urN openssh-2.5.1p1-orig/auth-pam.c openssh-2.5.1p1/auth-pam.c
--- openssh-2.5.1p1-orig/auth-pam.c	Wed Feb 14 18:51:32 2001
+++ openssh-2.5.1p1/auth-pam.c	Thu Feb 22 10:50:10 2001
@@ -33,6 +33,8 @@
 #include "canohost.h"
 #include "readpass.h"
 
+extern char *__progname;
+
 RCSID("$Id: auth-pam.c,v 1.29 2001/02/15 00:51:32 djm Exp $");
 
 #define NEW_AUTHTOK_MSG \
diff -urN openssh-2.5.1p1-orig/ssh.h openssh-2.5.1p1/ssh.h
--- openssh-2.5.1p1-orig/ssh.h	Mon Feb  5 09:43:59 2001
+++ openssh-2.5.1p1/ssh.h	Thu Feb 22 10:50:20 2001
@@ -61,7 +61,7 @@
 #define SSH_SERVICE_NAME	"ssh"
 
 #if defined(USE_PAM) && !defined(SSHD_PAM_SERVICE)
-# define SSHD_PAM_SERVICE       "sshd"
+# define SSHD_PAM_SERVICE       __progname
 #endif
 
 /*


More information about the openssh-unix-dev mailing list