<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/path.c, branch v1.7.0.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.7.0.5</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.7.0.5'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2010-03-08T08:36:00Z</updated>
<entry>
<title>Merge branch 'mm/mkstemps-mode-for-packfiles' into maint</title>
<updated>2010-03-08T08:36:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-03-08T08:36:00Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=493e433277ee72b200e72f7a17e08266ed9497c5'/>
<id>urn:sha1:493e433277ee72b200e72f7a17e08266ed9497c5</id>
<content type='text'>
* mm/mkstemps-mode-for-packfiles:
  Use git_mkstemp_mode instead of plain mkstemp to create object files
  git_mkstemps_mode: don't set errno to EINVAL on exit.
  Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
  git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.
  Move gitmkstemps to path.c
  Add a testcase for ACL with restrictive umask.
</content>
</entry>
<entry>
<title>git_mkstemps_mode: don't set errno to EINVAL on exit.</title>
<updated>2010-02-22T23:24:46Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-02-22T22:32:15Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1d9740cb324f7f5d798ecfc259dc213b244ad9b7'/>
<id>urn:sha1:1d9740cb324f7f5d798ecfc259dc213b244ad9b7</id>
<content type='text'>
When reaching the end of git_mkstemps_mode, at least one call to open()
has been done, and errno has been set accordingly. Setting errno is
therefore not necessary, and actually harmfull since callers can't
distinguish e.g. permanent failure from ENOENT, which can just mean that
we need to create the containing directory.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.</title>
<updated>2010-02-22T23:24:45Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-02-22T22:32:13Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b862b61c03797fd00490bb8caf05be840b79c6cb'/>
<id>urn:sha1:b862b61c03797fd00490bb8caf05be840b79c6cb</id>
<content type='text'>
gitmkstemps emulates the behavior of mkstemps, which is usually used
to create files in a shared directory like /tmp/, hence, it creates
files with permission 0600.

Add git_mkstemps_mode() that allows us to specify the desired mode, and
make git_mkstemps() a wrapper that always uses 0600 to call it. Later we
will use git_mkstemps_mode() when creating pack files.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Move gitmkstemps to path.c</title>
<updated>2010-02-22T23:24:45Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-02-22T22:32:12Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=00787ed55adbc2350efa911bf0bdebf6ca08c095'/>
<id>urn:sha1:00787ed55adbc2350efa911bf0bdebf6ca08c095</id>
<content type='text'>
This function used to be only a compatibility function, but we're
going to extend it and actually use it, so make it part of Git.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Typofixes outside documentation area</title>
<updated>2010-02-04T05:28:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-02-04T05:23:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9517e6b84357252e1882091343661c34d978771e'/>
<id>urn:sha1:9517e6b84357252e1882091343661c34d978771e</id>
<content type='text'>
    begining -&gt; beginning
    canonicalizations -&gt; canonicalization
    comand -&gt; command
    dewrapping -&gt; unwrapping
    dirtyness -&gt; dirtiness
    DISCLAMER -&gt; DISCLAIMER
    explicitely -&gt; explicitly
    feeded -&gt; fed
    impiled -&gt; implied
    madatory -&gt; mandatory
    mimick -&gt; mimic
    preceeding -&gt; preceding
    reqeuest -&gt; request
    substition -&gt; substitution

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ignore duplicated slashes in make_relative_path()</title>
<updated>2010-01-22T23:34:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-22T03:05:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=288123f01cb1b835edbf6e2e188159c2ff858aca'/>
<id>urn:sha1:288123f01cb1b835edbf6e2e188159c2ff858aca</id>
<content type='text'>
The function takes two paths, an early part of abs is supposed to match
base; otherwise abs is not a path under base and the function returns the
full path of abs.  The caller can easily confuse the implementation by
giving duplicated and needless slashes in these path arguments.

Credit for test script, motivation and initial patch goes to Thomas Rast.
A follow-up fix (squashed) is by Hannes.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mm/config-pathname-tilde-expand'</title>
<updated>2009-11-23T00:28:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-11-23T00:28:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=eb2fc8f899a58eedc87e7e8ea0fdecdc2ba9f430'/>
<id>urn:sha1:eb2fc8f899a58eedc87e7e8ea0fdecdc2ba9f430</id>
<content type='text'>
* mm/config-pathname-tilde-expand:
  Documentation: avoid xmlto input error
  expand_user_path: expand ~ to $HOME, not to the actual homedir.
  Expand ~ and ~user in core.excludesfile, commit.template
</content>
</entry>
<entry>
<title>expand_user_path: expand ~ to $HOME, not to the actual homedir.</title>
<updated>2009-11-19T18:01:12Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2009-11-19T15:21:15Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=df2a79f4225b7216dce010ebfe41f8ad0de34b24'/>
<id>urn:sha1:df2a79f4225b7216dce010ebfe41f8ad0de34b24</id>
<content type='text'>
In 395de250d (Expand ~ and ~user in core.excludesfile, commit.template),
we introduced the mechanism. But expanding ~ using getpw is not what
people overriding $HOME would usually expect. In particular, git looks
for the user's .gitconfig using $HOME, so it's better to be consistent.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Expand ~ and ~user in core.excludesfile, commit.template</title>
<updated>2009-11-18T05:53:11Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2009-11-17T17:24:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=395de250d9d9762b8ac1ce98b297d60d0b5bd643'/>
<id>urn:sha1:395de250d9d9762b8ac1ce98b297d60d0b5bd643</id>
<content type='text'>
These config variables are parsed to substitute ~ and ~user with getpw
entries.

user_path() refactored into new function expand_user_path(), to allow
dynamically allocating the return buffer.

Original patch by Karl Chen, modified by Matthieu Moy, and further
amended by Junio C Hamano.

Signed-off-by: Karl Chen &lt;quarl@quarl.org&gt;
Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-backend: Protect GIT_PROJECT_ROOT from /../ requests</title>
<updated>2009-11-10T00:37:33Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2009-11-09T19:26:43Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=34b6cb8bb032bd16f3d1c93a8417beb75e51ed29'/>
<id>urn:sha1:34b6cb8bb032bd16f3d1c93a8417beb75e51ed29</id>
<content type='text'>
Eons ago HPA taught git-daemon how to protect itself from /../
attacks, which Junio brought back into service in d79374c7b58d
("daemon.c and path.enter_repo(): revamp path validation").

I did not carry this into git-http-backend as originally we relied
only upon PATH_TRANSLATED, and assumed the HTTP server had done
its access control checks to validate the resolved path was within
a directory permitting access from the remote client.  This would
usually be sufficient to protect a server from requests for its
/etc/passwd file by http://host/smart/../etc/passwd sorts of URLs.

However in 917adc036086 Mark Lodato added GIT_PROJECT_ROOT as an
additional method of configuring the CGI.  When this environment
variable is used the web server does not generate the final access
path and therefore may blindly pass through "/../etc/passwd"
in PATH_INFO under the assumption that "/../" might have special
meaning to the invoked CGI.

Instead of permitting these sorts of malformed path requests, we
now reject them back at the client, with an error message for the
server log.  This matches git-daemon behavior.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
