[openssh-commits] [openssh] branch master updated: sshd: don't use argv[0] as PAM service name

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Jun 13 16:44:29 AEST 2024


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new a8fbe2f7 sshd: don't use argv[0] as PAM service name
a8fbe2f7 is described below

commit a8fbe2f7d0d96d299ee8e69769e3b51067978748
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Thu Jun 13 16:41:29 2024 +1000

    sshd: don't use argv[0] as PAM service name
    
    sshd would implicitly use argv[0] as the PAM service name to
    allow people to select different PAM service names by making
    differently-named copies/links to the sshd binary.
    
    Splitting sshd into sshd/sshd-session broke this, as the process
    that starts PAM is always sshd-session and the user has no control
    over this.
    
    Hardcode "sshd" as the default PAM service name unless/until we
    figure out a better way. Should unbreak OSX integration tests.
---
 auth-pam.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/auth-pam.c b/auth-pam.c
index ed5b165b..d6480237 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -68,8 +68,7 @@
 #endif
 
 #if !defined(SSHD_PAM_SERVICE)
-extern char *__progname;
-# define SSHD_PAM_SERVICE		__progname
+# define SSHD_PAM_SERVICE		"sshd"
 #endif
 
 /* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list