<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/daemon.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-04-24T05:07:57Z</updated>
<entry>
<title>Merge branch 'dt/xgethostname-nul-termination'</title>
<updated>2017-04-24T05:07:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5938454cbc585e0f4bdd9f1cc87c6886a3c1bff3'/>
<id>urn:sha1:5938454cbc585e0f4bdd9f1cc87c6886a3c1bff3</id>
<content type='text'>
gethostname(2) may not NUL terminate the buffer if hostname does
not fit; unfortunately there is no easy way to see if our buffer
was too small, but at least this will make sure we will not end up
using garbage past the end of the buffer.

* dt/xgethostname-nul-termination:
  xgethostname: handle long hostnames
  use HOST_NAME_MAX to size buffers for gethostname(2)
</content>
</entry>
<entry>
<title>use HOST_NAME_MAX to size buffers for gethostname(2)</title>
<updated>2017-04-19T02:57:41Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-04-18T21:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da25bdb7766c01665500cf7c7b75e76ea1f28b49'/>
<id>urn:sha1:da25bdb7766c01665500cf7c7b75e76ea1f28b49</id>
<content type='text'>
POSIX limits the length of host names to HOST_NAME_MAX.  Export the
fallback definition from daemon.c and use this constant to make all
buffers used with gethostname(2) big enough for any possible result
and a terminating NUL.

Inspired-by: David Turner &lt;dturner@twosigma.com&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: David Turner &lt;dturner@twosigma.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon: use an argv_array to exec children</title>
<updated>2017-03-30T21:59:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-03-28T19:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a97da396470cb85e289a4810326fd7f50062b96'/>
<id>urn:sha1:6a97da396470cb85e289a4810326fd7f50062b96</id>
<content type='text'>
Our struct child_process already has its own argv_array.
Let's use that to avoid having to format options into
separate buffers.

Note that we'll need to declare the child process outside of
the run_service_command() helper to do this. But that opens
up a further simplification, which is that the helper can
append to our argument list, saving each caller from
specifying "." manually.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/daemon-path-ok-check-truncation' into maint</title>
<updated>2016-11-29T21:27:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-11-29T21:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aa22ef8a80997771d8a1f3e329139637e1ee63ec'/>
<id>urn:sha1:aa22ef8a80997771d8a1f3e329139637e1ee63ec</id>
<content type='text'>
"git daemon" used fixed-length buffers to turn URL to the
repository the client asked for into the server side directory
path, using snprintf() to avoid overflowing these buffers, but
allowed possibly truncated paths to the directory.  This has been
tightened to reject such a request that causes overlong path to be
required to serve.

* jk/daemon-path-ok-check-truncation:
  daemon: detect and reject too-long paths
</content>
</entry>
<entry>
<title>Merge branch 'ls/filter-process'</title>
<updated>2016-10-31T20:15:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-31T20:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbaa6bdce22914843e956e36d41d328547514342'/>
<id>urn:sha1:dbaa6bdce22914843e956e36d41d328547514342</id>
<content type='text'>
The smudge/clean filter API expect an external process is spawned
to filter the contents for each path that has a filter defined.  A
new type of "process" filter API has been added to allow the first
request to run the filter for a path to spawn a single process, and
all filtering need is served by this single process for multiple
paths, reducing the process creation overhead.

* ls/filter-process:
  contrib/long-running-filter: add long running filter example
  convert: add filter.&lt;driver&gt;.process option
  convert: prepare filter.&lt;driver&gt;.process option
  convert: make apply_filter() adhere to standard Git error handling
  pkt-line: add functions to read/write flush terminated packet streams
  pkt-line: add packet_write_gently()
  pkt-line: add packet_flush_gently()
  pkt-line: add packet_write_fmt_gently()
  pkt-line: extract set_packet_header()
  pkt-line: rename packet_write() to packet_write_fmt()
  run-command: add clean_on_exit_handler
  run-command: move check_pipe() from write_or_die to run_command
  convert: modernize tests
  convert: quote filter names in error messages
</content>
</entry>
<entry>
<title>Merge branch 'jk/daemon-path-ok-check-truncation'</title>
<updated>2016-10-27T21:58:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-27T21:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee87d47b364cdaf78badefb3f7044b8074ed1550'/>
<id>urn:sha1:ee87d47b364cdaf78badefb3f7044b8074ed1550</id>
<content type='text'>
"git daemon" used fixed-length buffers to turn URL to the
repository the client asked for into the server side directory
path, using snprintf() to avoid overflowing these buffers, but
allowed possibly truncated paths to the directory.  This has been
tightened to reject such a request that causes overlong path to be
required to serve.

* jk/daemon-path-ok-check-truncation:
  daemon: detect and reject too-long paths
</content>
</entry>
<entry>
<title>daemon: detect and reject too-long paths</title>
<updated>2016-10-24T16:59:29Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-22T04:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6bdb0083be3b42aab5dfa6bf18b447623704f7f5'/>
<id>urn:sha1:6bdb0083be3b42aab5dfa6bf18b447623704f7f5</id>
<content type='text'>
When we are checking the path via path_ok(), we use some
fixed PATH_MAX buffers. We write into them via snprintf(),
so there's no possibility of overflow, but it does mean we
may silently truncate the path, leading to potentially
confusing errors when the partial path does not exist.

We're better off to reject the path explicitly.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pkt-line: rename packet_write() to packet_write_fmt()</title>
<updated>2016-10-17T18:36:50Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2016-10-16T23:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=81c634e94f2fef0cec295f7554080c82bd6aeeb7'/>
<id>urn:sha1:81c634e94f2fef0cec295f7554080c82bd6aeeb7</id>
<content type='text'>
packet_write() should be called packet_write_fmt() because it is a
printf-like function that takes a format string as first parameter.

packet_write_fmt() should be used for text strings only. Arbitrary
binary data should use a new packet_write() function that is introduced
in a subsequent patch.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/common-main' into maint</title>
<updated>2016-09-09T04:35:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-09T04:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=faacc8efe503a470c0c549c7949824728d7f1461'/>
<id>urn:sha1:faacc8efe503a470c0c549c7949824728d7f1461</id>
<content type='text'>
There are certain house-keeping tasks that need to be performed at
the very beginning of any Git program, and programs that are not
built-in commands had to do them exactly the same way as "git"
potty does.  It was easy to make mistakes in one-off standalone
programs (like test helpers).  A common "main()" function that
calls cmd_main() of individual program has been introduced to
make it harder to make mistakes.

* jk/common-main:
  mingw: declare main()'s argv as const
  common-main: call git_setup_gettext()
  common-main: call restore_sigpipe_to_default()
  common-main: call sanitize_stdfds()
  common-main: call git_extract_argv0_path()
  add an extra level of indirection to main()
</content>
</entry>
<entry>
<title>Merge branch 'ew/daemon-socket-keepalive'</title>
<updated>2016-07-28T17:34:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-28T17:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b48dfd86c90cae3f98dca01101b7e298c0192d16'/>
<id>urn:sha1:b48dfd86c90cae3f98dca01101b7e298c0192d16</id>
<content type='text'>
Recent update to "git daemon" tries to enable the socket-level
KEEPALIVE, but when it is spawned via inetd, the standard input
file descriptor may not necessarily be connected to a socket.
Suppress an ENOTSOCK error from setsockopt().

* ew/daemon-socket-keepalive:
  Windows: add missing definition of ENOTSOCK
  daemon: ignore ENOTSOCK from setsockopt
</content>
</entry>
</feed>
