Ticket #13046: fix-openssh-4.7p1-for-leopard-2.patch

File fix-openssh-4.7p1-for-leopard-2.patch, 1.5 KB (added by callahad@…, 17 years ago)

Only apply the fix if the host is running leopard. (I presume that otherwise would cause a regression)

  • Portfile

    diff -Naur openssh-orig/Portfile openssh-new/Portfile
    old new  
    44
    55name            openssh
    66version         4.7p1
    7 revision        1
     7revision        2
    88categories      net
    99maintainers     nomaintainer
    1010description     OpenSSH secure login server
     
    4141        ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
    4242depends_lib     port:openssl port:zlib
    4343
     44# Fix "Percent expand: NULL replacement" error on Leopard
     45platform darwin 9 {
     46        patchfiles-append    percent_expand_fix.patch
     47        patch.pre_args       -p1 }
     48
    4449# Specified -fno-builtin because GCC 3.3 has log() as a builtin
    4550# (from math.h) while OpenSSH has its own log() function
    4651# -- from fink.
  • files/percent_expand_fix.patch

    diff -Naur openssh-orig/files/percent_expand_fix.patch openssh-new/files/percent_expand_fix.patch
    old new  
     1diff -Naur openssh-4.7p1-orig/ssh.c openssh-4.7p1-new/ssh.c
     2--- openssh-4.7p1-orig/ssh.c    2007-08-08 06:32:41.000000000 +0200
     3+++ openssh-4.7p1-new/ssh.c     2007-10-30 09:14:44.000000000 +0100
     4@@ -1242,6 +1242,7 @@
     5 #endif /* SMARTCARD */
     6        if ((pw = getpwuid(original_real_uid)) == NULL)
     7                fatal("load_public_identity_files: getpwuid failed");
     8+       pw = pwcopy(pw);
     9        if (gethostname(thishost, sizeof(thishost)) == -1)
     10                fatal("load_public_identity_files: gethostname: %s",
     11                    strerror(errno));