git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[BULLS**T PATCH] Allow Git to work at Insane Bank Corp

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 15, 2007, 01:52 UTC
Message-ID
<20071115015227.GA2116@spearce.org>

Oh what a day I've had. Today Insane Bank Corp (my day-job employer) upgraded their Windows desktop encryption software. *Every* directory on every computer is now blessed with a "Desktop.ini" file. Git of course loves this concept:

 $ git for-each-ref >/dev/null && echo yes
 error: refs/Desktop.ini points nowhere!
 error: refs/heads/Desktop.ini points nowhere!
 yes

Fortunately for-each-ref allows corrupt refs to exist in the ref namespace. So until Git is properly patched we are at least able to ignore these error messages.

For corporate security reasons it is obviously absolutely vital that these Desktop.ini files exist in every directory of every system. Even if application software scans all files in a particular directory and assumes those files belong to it. If these files did not exist it would not be possible for Insane Bank Corp to protect its customer's data, which of course must be toted around on $1000 laptops in the posession of any employee who asks for one.

Because Insane Bank Corp is one of the largest banks in the world all 3rd party software vendors must comply and correct their applications to not fail when they encounter Desktop.ini in an application's internal data directory. Or they will lose their contract with Insane Bank Corp.

This patch must be applied to Git, since Git is a 3rd party software product and its global assets are much smaller than those of Insane Bank Corp. If not applied Git won't be permitted for use. Git could lose all of its software licenses and support contracts. Git shall do as Insane Bank Corp requests.

Never-Shall-Be-Signed-Off-By: me
---
 </rant off>
 Seriously, this patch shouldn't ever be made to Git.  I'll likely
 have to carry it in my own local build process until the end
 of time.
 Our corporate security goons are unable to fathom why having
 "Desktop.ini" shoved into every directory of every filesystem may
 cause problems for some applications.  Especially those who may
 attempt to read every file in a given directory.
 Just thought folks would like to see what sort of bulls**t patches
 internal developers need to create for systems because they are
 unable to rely upon the operating system they are forced to rely
 upon for "security reasons".  Yes, really, Insane Bank Corp feels
 that Microsoft Windows Xtreme Professional is more trustworthy
 than RedHat Linux.  Especially when toted in someone's backpack.
 Just so long as Desktop.ini is in every directory we're safe.
 Grrrrrrrrrrrrr.
 </rant really is now off>
 git-compat-util.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index ca0a597..ca875c7 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -172,6 +172,19 @@ extern uintmax_t gitstrtoumax(const char *, char **, int);
 extern const char *githstrerror(int herror);
 #endif
 
+#ifdef WORK_FOR_INSANE_BANK_CORP
+static inline struct dirent *gitreaddir(DIR *dirp)
+{
+	struct dirent *r;
+	while ((r = readdir(dirp))) {
+		if (!strcasecmp(r->d_name, "Desktop.ini"))
+			continue;
+	}
+	return r;
+}
+#define readdir gitreaddir
+#endif
+
 extern void release_pack_memory(size_t, int);
 
 static inline char* xstrdup(const char *str)
-- 
1.5.3.5.1728.g34b3e
Next: Johannes Schindelin
Message 1 of 5 in “Allow Git to work at Insane Bank Corp”
  1. Allow Git to work at Insane Bank CorpShawn O. Pearce, Nov 15, 2007
  2. Johannes SchindelinNov 15, 2007
  3. Shawn O. PearceNov 15, 2007
  4. Morten WelinderNov 15, 2007
  5. Junio C HamanoNov 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.