Update to git-1.6.1.

Also fixes command injection vulnerabilities in gitweb.
(CVE-2008-5516, CVE-2008-5517) Hint from jasper@, thanks!

help & tests sturm@
This commit is contained in:
bernd 2009-01-24 14:31:28 +00:00
parent cf89c19ebf
commit ce191c802f
11 changed files with 178 additions and 49 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.38 2008/12/09 09:53:33 bernd Exp $
# $OpenBSD: Makefile,v 1.39 2009/01/24 14:31:28 bernd Exp $
COMMENT-main= GIT - Tree History Storage Tool
COMMENT-svn= GIT - subversion interoperability tools
COMMENT-x11= GIT - graphical tools
V= 1.6.0.5
V= 1.6.1
DISTNAME= git-${V}
PKGNAME-main= ${DISTNAME}
PKGNAME-svn= git-svn-${V}
@ -39,7 +39,7 @@ BUILD_DEPENDS= ::archivers/gtar \
MULTI_PACKAGES= -main -svn -x11
WANTLIB-main= c expat crypto z
WANTLIB-main= c expat crypto pthread ssl z
RUN_DEPENDS-main= ::net/rsync \
::devel/p5-Error \
${MODLIBICONV_RUN_DEPENDS}
@ -69,7 +69,8 @@ USE_GMAKE= Yes
REGRESS_DEPENDS= :zip-*:archivers/zip \
:cvsps-*:devel/cvsps \
::devel/subversion,-perl
::devel/subversion,-perl \
::sysutils/ggrep
post-extract:
@mkdir -p ${WRKSRC}/doc

View File

@ -1,15 +1,15 @@
MD5 (git-1.6.0.5.tar.gz) = fiTVZk+pTqYUaVVl/qpZag==
MD5 (git-htmldocs-1.6.0.5.tar.gz) = /WzUj1zwYtl4or05aTk/Hw==
MD5 (git-manpages-1.6.0.5.tar.gz) = vsp26lWR4K4mDmd6oHpylA==
RMD160 (git-1.6.0.5.tar.gz) = GqIT3g1KNixSOkz86e6AgY9R+zo=
RMD160 (git-htmldocs-1.6.0.5.tar.gz) = xqNjDOQGFugSKu1znrYOiPnDNKw=
RMD160 (git-manpages-1.6.0.5.tar.gz) = FrUeM+WEMpTjmiECQgAPacZ7jtI=
SHA1 (git-1.6.0.5.tar.gz) = rNE+MQQqVk9muRYaBytuR36XLpY=
SHA1 (git-htmldocs-1.6.0.5.tar.gz) = VW1UURrLClyXNmUdP91nKWZlPSQ=
SHA1 (git-manpages-1.6.0.5.tar.gz) = GmQ+AgH1ZuTqRDrAMBqBFcc+5JI=
SHA256 (git-1.6.0.5.tar.gz) = yhTyayh8nQcqstzqRjgkEqhtbU8gLhlmQmoUsWGvNQo=
SHA256 (git-htmldocs-1.6.0.5.tar.gz) = V43prrgmoVuW/rxzINw9nlGzTVRG4fv0QA9rE6T0rA8=
SHA256 (git-manpages-1.6.0.5.tar.gz) = Ldg1egZSgjinnGnMbefUSG53Yf526Y7qez5jOVYvgzE=
SIZE (git-1.6.0.5.tar.gz) = 2250817
SIZE (git-htmldocs-1.6.0.5.tar.gz) = 964467
SIZE (git-manpages-1.6.0.5.tar.gz) = 310865
MD5 (git-1.6.1.tar.gz) = H5FZKdT1Si4ESaSgjwkxGA==
MD5 (git-htmldocs-1.6.1.tar.gz) = SJ/2lpB6ElOzi+MZJPamzQ==
MD5 (git-manpages-1.6.1.tar.gz) = l/M9oxfQU6H675uU1MMoOA==
RMD160 (git-1.6.1.tar.gz) = pvMiFr5otul4+dF83u6fBD9W/6A=
RMD160 (git-htmldocs-1.6.1.tar.gz) = PcYKM6KxpeX4/kOCvWvyaSnIVKI=
RMD160 (git-manpages-1.6.1.tar.gz) = IdgPa6swjF5GR7pOoReGoh5DUp8=
SHA1 (git-1.6.1.tar.gz) = 2/5tLIORqExCndmoeh4fyYzkirs=
SHA1 (git-htmldocs-1.6.1.tar.gz) = qm/tXAD90d4iY/BHAKh20HQj+rc=
SHA1 (git-manpages-1.6.1.tar.gz) = PjWyzMJLzjHfPpzLsQ4MHzDkr+U=
SHA256 (git-1.6.1.tar.gz) = fgl5ZtMaoNGPUfgPZuGa5t9NUj/nQimPMxdRMd4hoew=
SHA256 (git-htmldocs-1.6.1.tar.gz) = z9KUOeZ/mYBuGXIxSHGyvHu4JsEcKNbh1O+Zidj5I1A=
SHA256 (git-manpages-1.6.1.tar.gz) = uCORUeN9N8DvwnebJ52ZWyMnntm32pFyfKO4oLFPxZA=
SIZE (git-1.6.1.tar.gz) = 2381834
SIZE (git-htmldocs-1.6.1.tar.gz) = 1007598
SIZE (git-manpages-1.6.1.tar.gz) = 327846

View File

@ -1,6 +1,6 @@
--- Makefile.orig Sat Sep 13 04:29:50 2008
+++ Makefile Sat Sep 13 16:03:31 2008
@@ -164,7 +164,7 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo
--- Makefile.orig Thu Dec 25 06:33:25 2008
+++ Makefile Sat Jan 24 15:30:26 2009
@@ -170,7 +170,7 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo
# CFLAGS and LDFLAGS are for the users to override from the command line.
@ -9,7 +9,7 @@
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@ -180,11 +180,11 @@ STRIP ?= strip
@@ -186,11 +186,11 @@ STRIP ?= strip
# runtime figures out where they are based on the path to the executable.
# This can help installing the suite in a relocatable way.
@ -24,7 +24,7 @@
sharedir = $(prefix)/share
template_dir = $(sharedir)/git-core/templates
htmldir=$(sharedir)/doc/git-doc
@@ -194,7 +194,7 @@ else
@@ -200,7 +200,7 @@ else
sysconfdir = $(prefix)/etc
endif
lib = lib
@ -33,7 +33,7 @@
# DESTDIR=
# default configuration for gitweb
@@ -217,15 +217,15 @@ GITWEB_SITE_FOOTER =
@@ -223,16 +223,16 @@ GITWEB_SITE_FOOTER =
export prefix bindir sharedir htmldir sysconfdir
@ -47,13 +47,15 @@
RPMBUILD = rpmbuild
-TCL_PATH = tclsh
-TCLTK_PATH = wish
-PTHREAD_LIBS = -lpthread
+TCL_PATH ?= tclsh
+TCLTK_PATH ?= wish
+PTHREAD_LIBS = -pthread
export TCL_PATH TCLTK_PATH
@@ -681,11 +681,10 @@ ifeq ($(uname_S),FreeBSD)
COMPAT_OBJS += compat/regex/regex.o
@@ -703,11 +703,10 @@ ifeq ($(uname_S),FreeBSD)
endif
endif
ifeq ($(uname_S),OpenBSD)
- NO_STRCASESTR = YesPlease
@ -63,10 +65,10 @@
- BASIC_LDFLAGS += -L/usr/local/lib
+ BASIC_CFLAGS += -I${X11BASE}/include -I${LOCALBASE}/include
+ BASIC_LDFLAGS += -L${X11BASE}/lib -L${LOCALBASE}/lib
THREADED_DELTA_SEARCH = YesPlease
endif
ifeq ($(uname_S),NetBSD)
ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
@@ -762,7 +761,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
@@ -793,7 +792,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/regex/regex.o compat/winansi.o
EXTLIBS += -lws2_32
X = .exe
@ -75,8 +77,8 @@
template_dir = ../share/git-core/templates/
ETC_GITCONFIG = ../etc/gitconfig
endif
@@ -832,7 +831,7 @@ ifndef NO_POSIX_ONLY_PROGRAMS
PROGRAMS += git-shell$X
@@ -864,7 +863,7 @@ ifndef NO_POSIX_ONLY_PROGRAMS
PROGRAMS += git-imap-send$X
endif
ifndef NO_OPENSSL
- OPENSSL_LIBSSL = -lssl
@ -84,7 +86,7 @@
ifdef OPENSSLDIR
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
@@ -1311,7 +1310,7 @@ all:: $(TEST_PROGRAMS)
@@ -1363,7 +1362,7 @@ all:: $(TEST_PROGRAMS)
export NO_SVN_TESTS

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-builtin-help_c,v 1.1 2009/01/24 14:31:29 bernd Exp $
Fix "warning: missing sentinel in function call" on 64bit archs.
--- builtin-help.c.orig Fri Jan 23 09:33:07 2009
+++ builtin-help.c Fri Jan 23 09:34:57 2009
@@ -123,7 +123,7 @@ static void exec_woman_emacs(const char* path, const c
if (!path)
path = "emacsclient";
strbuf_addf(&man_page, "(woman \"%s\")", page);
- execlp(path, "emacsclient", "-e", man_page.buf, NULL);
+ execlp(path, "emacsclient", "-e", man_page.buf, (void *)NULL);
warning("failed to exec '%s': %s", path, strerror(errno));
}
}
@@ -151,7 +151,7 @@ static void exec_man_konqueror(const char* path, const
} else
path = "kfmclient";
strbuf_addf(&man_page, "man:%s(1)", page);
- execlp(path, filename, "newTab", man_page.buf, NULL);
+ execlp(path, filename, "newTab", man_page.buf, (void *)NULL);
warning("failed to exec '%s': %s", path, strerror(errno));
}
}
@@ -160,7 +160,7 @@ static void exec_man_man(const char* path, const char
{
if (!path)
path = "man";
- execlp(path, "man", page, NULL);
+ execlp(path, "man", page, (void *)NULL);
warning("failed to exec '%s': %s", path, strerror(errno));
}
@@ -168,7 +168,7 @@ static void exec_man_cmd(const char *cmd, const char *
{
struct strbuf shell_cmd = STRBUF_INIT;
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
- execl("/bin/sh", "sh", "-c", shell_cmd.buf, NULL);
+ execl("/bin/sh", "sh", "-c", shell_cmd.buf, (void *)NULL);
warning("failed to exec '%s': %s", cmd, strerror(errno));
}
@@ -376,7 +376,7 @@ static void show_info_page(const char *git_cmd)
{
const char *page = cmd_to_page(git_cmd);
setenv("INFOPATH", GIT_INFO_PATH, 1);
- execlp("info", "info", "gitman", page, NULL);
+ execlp("info", "info", "gitman", page, (void *)NULL);
}
static void get_html_page_path(struct strbuf *page_path, const char *page)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-git-gui_git-gui_sh,v 1.5 2008/09/27 21:47:20 bernd Exp $
--- git-gui/git-gui.sh.orig Sun Aug 17 22:43:06 2008
+++ git-gui/git-gui.sh Mon Aug 25 09:30:04 2008
@@ -2997,7 +2997,9 @@ if {[winfo exists $ui_comm]} {
$OpenBSD: patch-git-gui_git-gui_sh,v 1.6 2009/01/24 14:31:29 bernd Exp $
--- git-gui/git-gui.sh.orig Thu Dec 25 06:33:25 2008
+++ git-gui/git-gui.sh Thu Dec 25 19:25:32 2008
@@ -3430,7 +3430,9 @@ if {[winfo exists $ui_comm]} {
# in pipe mode to spellcheck the commit message.
#
set spell_cmd [list |]

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-gitweb_gitweb_perl,v 1.7 2008/12/09 09:53:33 bernd Exp $
$OpenBSD: patch-gitweb_gitweb_perl,v 1.8 2009/01/24 14:31:29 bernd Exp $
This prevents the following error: '-T and -B not implemented on filehandles'
--- gitweb/gitweb.perl.orig Mon Dec 8 02:21:49 2008
+++ gitweb/gitweb.perl Mon Dec 8 11:16:25 2008
@@ -4299,7 +4299,7 @@ sub git_blob_plain {
--- gitweb/gitweb.perl.orig Thu Dec 25 06:33:25 2008
+++ gitweb/gitweb.perl Thu Dec 25 19:30:58 2008
@@ -4724,7 +4724,7 @@ sub git_blob_plain {
$expires = "+1d";
}
@ -13,10 +13,10 @@ This prevents the following error: '-T and -B not implemented on filehandles'
or die_error(500, "Open git-cat-file blob '$hash' failed");
# content-type (can include charset)
@@ -4342,7 +4342,7 @@ sub git_blob {
@@ -4767,7 +4767,7 @@ sub git_blob {
}
my ($have_blame) = gitweb_check_feature('blame');
my $have_blame = gitweb_check_feature('blame');
- open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
+ open my $fd, "-|:raw:perlio", git_cmd(), "cat-file", "blob", $hash
or die_error(500, "Couldn't cat $file_name, $hash");

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-imap-send_c,v 1.1 2009/01/24 14:31:29 bernd Exp $
Fix "warning: missing sentinel in function call" on 64bit archs.
--- imap-send.c.orig Fri Jan 23 09:42:51 2009
+++ imap-send.c Fri Jan 23 09:43:04 2009
@@ -1009,7 +1009,7 @@ static struct store *imap_open_store(struct imap_serve
_exit(127);
close(a[0]);
close(a[1]);
- execl("/bin/sh", "sh", "-c", srvc->tunnel, NULL);
+ execl("/bin/sh", "sh", "-c", srvc->tunnel, (void *)NULL);
_exit(127);
}

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-t_t8005-blame-i18n_sh,v 1.1 2009/01/24 14:31:29 bernd Exp $
--- t/t8005-blame-i18n.sh.orig Thu Dec 25 19:40:20 2008
+++ t/t8005-blame-i18n.sh Thu Dec 25 19:41:09 2008
@@ -36,7 +36,7 @@ EOF
test_expect_success \
'blame respects i18n.commitencoding' '
git blame --incremental file | \
- grep "^\(author\|summary\) " > actual &&
+ ggrep "^\(author\|summary\) " > actual &&
test_cmp actual expected
'
@@ -53,7 +53,7 @@ test_expect_success \
'blame respects i18n.logoutputencoding' '
git config i18n.logoutputencoding cp1251 &&
git blame --incremental file | \
- grep "^\(author\|summary\) " > actual &&
+ ggrep "^\(author\|summary\) " > actual &&
test_cmp actual expected
'
@@ -69,7 +69,7 @@ EOF
test_expect_success \
'blame respects --encoding=utf-8' '
git blame --incremental --encoding=utf-8 file | \
- grep "^\(author\|summary\) " > actual &&
+ ggrep "^\(author\|summary\) " > actual &&
test_cmp actual expected
'
@@ -85,7 +85,7 @@ EOF
test_expect_success \
'blame respects --encoding=none' '
git blame --incremental --encoding=none file | \
- grep "^\(author\|summary\) " > actual &&
+ ggrep "^\(author\|summary\) " > actual &&
test_cmp actual expected
'

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-t_t9117-git-svn-init-clone_sh,v 1.1 2008/06/24 20:28:01 bernd Exp $
--- t/t9117-git-svn-init-clone.sh.orig Thu Jun 19 15:07:06 2008
+++ t/t9117-git-svn-init-clone.sh Thu Jun 19 15:07:10 2008
@@ -8,7 +8,6 @@ test_description='git-svn init/clone tests'
$OpenBSD: patch-t_t9117-git-svn-init-clone_sh,v 1.2 2009/01/24 14:31:29 bernd Exp $
--- t/t9117-git-svn-init-clone.sh.orig Thu Dec 25 06:33:25 2008
+++ t/t9117-git-svn-init-clone.sh Thu Dec 25 19:25:32 2008
@@ -8,7 +8,6 @@ test_description='git svn init/clone tests'
. ./lib-git-svn.sh
# setup, run inside tmp so we don't have any conflicts with $svnrepo

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.22 2008/12/09 09:53:33 bernd Exp $
@comment $OpenBSD: PLIST-main,v 1.23 2009/01/24 14:31:29 bernd Exp $
@pkgpath devel/git
@bin bin/git
bin/git-cvsserver
@ -57,7 +57,9 @@ libexec/git/git-filter-branch
@bin libexec/git/git-gc
@bin libexec/git/git-get-tar-commit-id
@bin libexec/git/git-grep
libexec/git/git-gui--askpass
@bin libexec/git/git-hash-object
@bin libexec/git/git-help
@bin libexec/git/git-http-fetch
@bin libexec/git/git-http-push
@bin libexec/git/git-imap-send
@ -124,6 +126,7 @@ libexec/git/git-sh-setup
@bin libexec/git/git-show-branch
@bin libexec/git/git-show-index
@bin libexec/git/git-show-ref
@bin libexec/git/git-stage
libexec/git/git-stash
@bin libexec/git/git-status
@bin libexec/git/git-stripspace
@ -251,6 +254,7 @@ libexec/git/git-web--browse
@man man/man1/git-show-index.1
@man man/man1/git-show-ref.1
@man man/man1/git-show.1
@man man/man1/git-stage.1
@man man/man1/git-stash.1
@man man/man1/git-status.1
@man man/man1/git-stripspace.1
@ -285,6 +289,7 @@ libexec/git/git-web--browse
@man man/man7/gitglossary.7
@man man/man7/gittutorial-2.7
@man man/man7/gittutorial.7
@man man/man7/gitworkflows.7
share/doc/git/
share/doc/git/RelNotes-1.5.0.1.txt
share/doc/git/RelNotes-1.5.0.2.txt
@ -322,25 +327,30 @@ share/doc/git/RelNotes-1.5.4.3.txt
share/doc/git/RelNotes-1.5.4.4.txt
share/doc/git/RelNotes-1.5.4.5.txt
share/doc/git/RelNotes-1.5.4.6.txt
share/doc/git/RelNotes-1.5.4.7.txt
share/doc/git/RelNotes-1.5.4.txt
share/doc/git/RelNotes-1.5.5.1.txt
share/doc/git/RelNotes-1.5.5.2.txt
share/doc/git/RelNotes-1.5.5.3.txt
share/doc/git/RelNotes-1.5.5.4.txt
share/doc/git/RelNotes-1.5.5.5.txt
share/doc/git/RelNotes-1.5.5.6.txt
share/doc/git/RelNotes-1.5.5.txt
share/doc/git/RelNotes-1.5.6.1.txt
share/doc/git/RelNotes-1.5.6.2.txt
share/doc/git/RelNotes-1.5.6.3.txt
share/doc/git/RelNotes-1.5.6.4.txt
share/doc/git/RelNotes-1.5.6.5.txt
share/doc/git/RelNotes-1.5.6.6.txt
share/doc/git/RelNotes-1.5.6.txt
share/doc/git/RelNotes-1.6.0.1.txt
share/doc/git/RelNotes-1.6.0.2.txt
share/doc/git/RelNotes-1.6.0.3.txt
share/doc/git/RelNotes-1.6.0.4.txt
share/doc/git/RelNotes-1.6.0.5.txt
share/doc/git/RelNotes-1.6.0.6.txt
share/doc/git/RelNotes-1.6.0.txt
share/doc/git/RelNotes-1.6.1.txt
share/doc/git/blame-options.txt
share/doc/git/cmds-ancillaryinterrogators.txt
share/doc/git/cmds-ancillarymanipulators.txt
@ -572,6 +582,8 @@ share/doc/git/git-show-ref.html
share/doc/git/git-show-ref.txt
share/doc/git/git-show.html
share/doc/git/git-show.txt
share/doc/git/git-stage.html
share/doc/git/git-stage.txt
share/doc/git/git-stash.html
share/doc/git/git-stash.txt
share/doc/git/git-status.html
@ -642,15 +654,17 @@ share/doc/git/gittutorial-2.html
share/doc/git/gittutorial-2.txt
share/doc/git/gittutorial.html
share/doc/git/gittutorial.txt
share/doc/git/gitworkflows.html
share/doc/git/gitworkflows.txt
share/doc/git/glossary-content.txt
share/doc/git/howto/
share/doc/git/howto-index.html
share/doc/git/howto-index.txt
share/doc/git/howto/maintain-git.txt
share/doc/git/howto/rebase-and-edit.txt
share/doc/git/howto/rebase-from-internal-branch.txt
share/doc/git/howto/rebuild-from-update-hook.txt
share/doc/git/howto/recover-corrupted-blob-object.txt
share/doc/git/howto/revert-a-faulty-merge.txt
share/doc/git/howto/revert-branch-rebase.html
share/doc/git/howto/revert-branch-rebase.txt
share/doc/git/howto/separating-topic-branches.txt

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-x11,v 1.4 2008/09/27 21:47:20 bernd Exp $
@comment $OpenBSD: PLIST-x11,v 1.5 2009/01/24 14:31:29 bernd Exp $
@conflict git-<=1.5.4.2p0
bin/gitk
libexec/git/git-citool
@ -38,22 +38,29 @@ share/git-gui/lib/git-gui.ico
share/git-gui/lib/index.tcl
share/git-gui/lib/logo.tcl
share/git-gui/lib/merge.tcl
share/git-gui/lib/mergetool.tcl
share/git-gui/lib/msgs/
share/git-gui/lib/msgs/de.msg
share/git-gui/lib/msgs/fr.msg
share/git-gui/lib/msgs/hu.msg
share/git-gui/lib/msgs/it.msg
share/git-gui/lib/msgs/ja.msg
share/git-gui/lib/msgs/nb.msg
share/git-gui/lib/msgs/ru.msg
share/git-gui/lib/msgs/sv.msg
share/git-gui/lib/msgs/zh_cn.msg
share/git-gui/lib/option.tcl
share/git-gui/lib/remote.tcl
share/git-gui/lib/remote_add.tcl
share/git-gui/lib/remote_branch_delete.tcl
share/git-gui/lib/search.tcl
share/git-gui/lib/shortcut.tcl
share/git-gui/lib/spellcheck.tcl
share/git-gui/lib/sshkey.tcl
share/git-gui/lib/status_bar.tcl
share/git-gui/lib/tclIndex
share/git-gui/lib/tools.tcl
share/git-gui/lib/tools_dlg.tcl
share/git-gui/lib/transport.tcl
share/git-gui/lib/win32.tcl
share/git-gui/lib/win32_shortcut.js