From: Junio C Hamano Date: Fri, 19 Jan 2024 23:04:46 +0000 (-0800) Subject: Merge branch 'sk/mingw-owner-check-error-message-improvement' X-Git-Tag: v2.44.0-rc0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5fb62354213384d5f443c2cd835670407a3a2da;p=thirdparty%2Fgit.git Merge branch 'sk/mingw-owner-check-error-message-improvement' In addition to (rather cryptic) Security Identifiers, show username and domain in the error message when we barf on mismatch between the Git directory and the current user on Windows. * sk/mingw-owner-check-error-message-improvement: mingw: give more details about unsafe directory's ownership --- b5fb62354213384d5f443c2cd835670407a3a2da diff --cc compat/mingw.c index 42053c1f65,852cfe8d0f..238a84ddba --- a/compat/mingw.c +++ b/compat/mingw.c @@@ -2762,12 -2773,14 +2786,14 @@@ int is_path_owned_by_current_sid(const /* * On FAT32 volumes, ownership is not actually recorded. */ - strbuf_addf(report, "'%s' is on a file system that does" + strbuf_addf(report, "'%s' is on a file system that does " "not record ownership\n", path); } else if (report) { - LPSTR str1, str2, to_free1 = NULL, to_free2 = NULL; + LPSTR str1, str2, str3, str4, to_free1 = NULL, + to_free3 = NULL, to_local_free2 = NULL, + to_local_free4 = NULL; - if (ConvertSidToStringSidA(sid, &str1)) + if (user_sid_to_user_name(sid, &str1)) to_free1 = str1; else str1 = "(inconvertible)";