Test snapshot
Stuart Craig
scraig at eli.net
Thu Aug 24 09:57:01 EST 2000
I'm in the process of building and testing the new snapshot on HP-UX
10.20 and HP-UX 11.
Attached to this message is a patch I made against 2.1.1p4 for HP-UX
which causes sshd to set the PATH variable from /etc/PATH. This is the
usual practice under HP-UX 10.20 and HP-UX 11. I activated the patch by
calling configure like so:
./configure --with-cflags=-DHAVE_ETC_PATH ...
This should be done in configure instead, but I haven't installed
autoconf.
This patch also works with the new snapshot.
- Stu
--
Stuart J. Craig <scraig at eli.net>
Senior UNIX Administrator
Electric Lightwave, Inc.
-------------- next part --------------
*** session.c.orig Tue Jul 11 16:45:27 2000
--- session.c Tue Jul 25 08:56:21 2000
***************
*** 900,905 ****
--- 900,908 ----
#ifdef WITH_IRIX_PROJECT
prid_t projid;
#endif /* WITH_IRIX_PROJECT */
+ #ifdef HAVE_ETC_PATH
+ char epbuf[4096];
+ #endif /* HAVE_ETC_PATH */
/* login(1) is only called if we execute the login shell */
if (options.use_login && command != NULL)
***************
*** 1076,1081 ****
--- 1079,1101 ----
/* Pull in any environment variables that may have been set by PAM. */
do_pam_environment(&env, &envsize);
#endif /* USE_PAM */
+
+ #ifdef HAVE_ETC_PATH
+ /* Under versions 10 and 11 of HP-UX, the /etc/PATH file should
+ * contain a single line which is the value for the PATH environment
+ * variable.
+ */
+ f = fopen("/etc/PATH", "r");
+ if (f) {
+ if (fgets(epbuf, sizeof(epbuf), f)) {
+ if (strchr(epbuf, '\n'))
+ *strchr(epbuf, '\n') = '\0';
+ if (strlen(epbuf) > 0)
+ child_set_env(&env, &envsize, "PATH", epbuf);
+ }
+ fclose(f);
+ }
+ #endif /* HAVE_ETC_PATH */
read_environment_file(&env,&envsize,"/etc/environment");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2515 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20000823/2d2c7c19/attachment.bin
More information about the openssh-unix-dev
mailing list