OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 05-May-2004 10:24:16
Branch: HEAD Handle: 2004050509241600
Added files:
openpkg-src/openssh openssh.patch.scpbindir
Modified files:
openpkg-src/openssh openssh.spec
Log:
add a cruel hack to workaround the issue that SCP would be found on
the server side only if the 'scp' command is in PATH
Summary:
Revision Changes Path
1.1 +51 -0 openpkg-src/openssh/openssh.patch.scpbindir
1.130 +4 -1 openpkg-src/openssh/openssh.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openssh/openssh.patch.scpbindir
============================================================================
$ cvs diff -u -r0 -r1.1 openssh.patch.scpbindir
--- /dev/null 2004-05-05 10:24:16.000000000 +0200
+++ openssh.patch.scpbindir 2004-05-05 10:24:16.000000000 +0200
@@ -0,0 +1,51 @@
+Index: session.c
+--- session.c.orig 2004-04-16 14:47:55.000000000 +0200
++++ session.c 2004-05-05 10:10:08.000000000 +0200
+@@ -73,9 +73,9 @@
+ void session_pty_cleanup(Session *);
+ void session_proctitle(Session *);
+ int session_setup_x11fwd(Session *);
+-void do_exec_pty(Session *, const char *);
++void do_exec_pty(Session *, char *);
+ void do_exec_no_pty(Session *, const char *);
+-void do_exec(Session *, const char *);
++void do_exec(Session *, char *);
+ void do_login(Session *, const char *);
+ #ifdef LOGIN_NEEDS_UTMPX
+ static void do_pre_login(Session *s);
+@@ -519,7 +519,7 @@
+ * lastlog, and other such operations.
+ */
+ void
+-do_exec_pty(Session *s, const char *command)
++do_exec_pty(Session *s, char *command)
+ {
+ int fdout, ptyfd, ttyfd, ptymaster;
+ pid_t pid;
+@@ -650,8 +650,25 @@
+ * to be forced, execute that instead.
+ */
+ void
+-do_exec(Session *s, const char *command)
++do_exec(Session *s, char *command)
+ {
++#ifdef OPENPKG_SCP_BINDIR
++ if ( command != NULL
++ && strlen(command) >= 3
++ && strncmp(command, "scp", 3) == 0
++ && (command[3] == ' ' || command[3] == '\0')) {
++ size_t l, k;
++ char *cp;
++ l = strlen(OPENPKG_SCP_BINDIR);
++ k = strlen(command);
++ cp = xmalloc(l+1+k+1);
++ snprintf(cp, l+1+k+1, "%s/%s", OPENPKG_SCP_BINDIR, command);
++ xfree(command);
++ command = cp;
++ debug("Forced SCP command '%.900s'", command);
++ }
++#endif
++
+ if (forced_command) {
+ original_command = command;
+ command = forced_command;
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openssh/openssh.spec
============================================================================
$ cvs diff -u -r1.129 -r1.130 openssh.spec
--- openpkg-src/openssh/openssh.spec 19 Apr 2004 19:28:55 -0000 1.129
+++ openpkg-src/openssh/openssh.spec 5 May 2004 08:24:16 -0000 1.130
@@ -42,7 +42,7 @@
Group: Security
License: BSD
Version: %{V_base}%{V_portable}
-Release: 20040419
+Release: 20040505
# package options
%option with_fsl yes
@@ -72,6 +72,7 @@
Patch3:
http://www.sc.isc.tohoku.ac.jp/~hgot/sources/openssh-%{V_watchdog}-watchdog.patch.tgz
Patch4:
http://ldappubkey.gcu-squad.org/%{V_ldap_vers1}/ldappubkey-ossh%{V_ldap_base}-%{V_ldap_vers2}.patch
Patch5: openssh.patch.sftplogging
+Patch6: openssh.patch.scpbindir
# build information
Prefix: %{l_prefix}
@@ -153,11 +154,13 @@
%if "%{with_sftplogging}" == "yes"
%patch -p1 -P 5
%endif
+ %patch -p0 -P 6
%build
# configure package
cflags=""
ldflags=""
+ cflags="$cflags -DOPENPKG_SCP_BINDIR=\\\"%{l_prefix}/bin\\\""
%if "%{with_chroot}" == "yes"
cflags="$cflags -DUSE_CHROOT"
%endif
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]