]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Wrap copy_environment_blacklist() in #ifdef
authorDamien Miller <djm@mindrot.org>
Tue, 21 Jan 2020 01:32:16 +0000 (12:32 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 21 Jan 2020 01:32:16 +0000 (12:32 +1100)
It's only needed for USE_PAM or HAVE_CYGWIN cases and will cause compiler
warnings otherwise.

session.c

index 431ccd83267b8b29d36c45385271593cc06515d4..e16f876c5ee8ce33a9226cd0d4cf4c7b4ca73662 100644 (file)
--- a/session.c
+++ b/session.c
@@ -946,6 +946,7 @@ read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
 }
 #endif /* HAVE_ETC_DEFAULT_LOGIN */
 
+#if defined(USE_PAM) || defined(HAVE_CYGWIN)
 static void
 copy_environment_blacklist(char **source, char ***env, u_int *envsize,
     const char *blacklist)
@@ -973,6 +974,7 @@ copy_environment_blacklist(char **source, char ***env, u_int *envsize,
                free(var_name);
        }
 }
+#endif /* defined(USE_PAM) || defined(HAVE_CYGWIN) */
 
 #ifdef HAVE_CYGWIN
 static void