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:   19-May-2004 17:15:34
  Branch: HEAD                             Handle: 2004051916153300

  Modified files:
    openpkg-src/openssh     openssh.patch.scpbindir openssh.spec

  Log:
    fix scp(1) hack once again

  Summary:
    Revision    Changes     Path
    1.3         +27 -34     openpkg-src/openssh/openssh.patch.scpbindir
    1.132       +4  -4      openpkg-src/openssh/openssh.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openssh/openssh.patch.scpbindir
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 openssh.patch.scpbindir
  --- openpkg-src/openssh/openssh.patch.scpbindir       6 May 2004 16:06:35 -0000      
 1.2
  +++ openpkg-src/openssh/openssh.patch.scpbindir       19 May 2004 15:15:33 -0000     
 1.3
  @@ -8,53 +8,46 @@
   
   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,26 @@
  -  * to be forced, execute that instead.
  -  */
  - void
  --do_exec(Session *s, const char *command)
  -+do_exec(Session *s, char *command)
  - {
  ++++ session.c        2004-05-19 17:02:30.000000000 +0200
  +@@ -66,6 +66,10 @@
  + #include "ssh-gss.h"
  + #endif
  + 
   +#ifndef SCPBINDIR
   +#define SCPBINDIR "@l_prefix@/bin"
   +#endif
  ++
  + /* func */
  + 
  + Session *session_new(void);
  +@@ -652,6 +656,21 @@
  + void
  + do_exec(Session *s, const char *command)
  + {
  ++    char *scp_command = NULL;
  ++
   +    if (   command != NULL
   +            && strlen(command) >= 3
   +            && strncmp(command, "scp", 3) == 0
   +            && (command[3] == ' ' || command[3] == '\0')) {
   +            size_t l, k;
  -+            char *cp;
   +            l = strlen(SCPBINDIR);
   +            k = strlen(command);
  -+            cp = xmalloc(l+1+k+1);
  -+            snprintf(cp, l+1+k+1, "%s/%s", SCPBINDIR, command);
  -+            xfree(command);
  -+            command = cp;
  ++            scp_command = xmalloc(l+1+k+1);
  ++            snprintf(scp_command, l+1+k+1, "%s/%s", SCPBINDIR, command);
  ++            command = (const char *)scp_command;
   +            debug("Forced SCP command '%.900s'", command);
   +    }
   +
        if (forced_command) {
                original_command = command;
                command = forced_command;
  +@@ -672,6 +691,8 @@
  +             do_exec_no_pty(s, command);
  + 
  +     original_command = NULL;
  ++    if (scp_command != NULL)
  ++            xfree(scp_command);
  + }
  + 
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openssh/openssh.spec
  ============================================================================
  $ cvs diff -u -r1.131 -r1.132 openssh.spec
  --- openpkg-src/openssh/openssh.spec  6 May 2004 16:06:35 -0000       1.131
  +++ openpkg-src/openssh/openssh.spec  19 May 2004 15:15:33 -0000      1.132
  @@ -42,7 +42,7 @@
   Group:        Security
   License:      BSD
   Version:      %{V_base}%{V_portable}
  -Release:      20040506
  +Release:      20040519
   
   #   package options
   %option       with_fsl          yes
  @@ -146,15 +146,15 @@
   %endif
   %if "%{with_watchdog}" == "yes"
       %{l_gzip} -d -c %{SOURCE openssh-%{V_watchdog}-watchdog.patch.tgz} | %{l_tar} 
xf -
  -    %{l_patch} -p0 <openssh-%{V_watchdog}-watchdog.patch
  +    %{l_patch} -p0 -b <openssh-%{V_watchdog}-watchdog.patch
   %endif
   %if "%{with_ldap}" == "yes"
  -    %{l_gzip} -d -c %{SOURCE ldappubkey-ossh%{V_ldap_base}-%{V_ldap_vers2}.patch} | 
%{l_patch} -p0
  +    %{l_gzip} -d -c %{SOURCE ldappubkey-ossh%{V_ldap_base}-%{V_ldap_vers2}.patch} | 
%{l_patch} -p0 -b
   %endif
   %if "%{with_sftplogging}" == "yes"
       %patch -p1 -P 5
   %endif
  -    sed -e 's;@l_prefix@;%{l_prefix};g' %{SOURCE openssh.patch.scpbindir} | 
%{l_patch} -p0
  +    sed -e 's;@l_prefix@;%{l_prefix};g' %{SOURCE openssh.patch.scpbindir} | 
%{l_patch} -p0 -b
   
   %build
       #   configure package
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to