diff --git a/Annex/Init.hs b/Annex/Init.hs index 5759adffc9..e59f045729 100644 --- a/Annex/Init.hs +++ b/Annex/Init.hs @@ -40,6 +40,7 @@ import Upgrade import Utility.UserInfo import Utility.FileMode import Annex.Perms +import System.Posix.User #endif genDescription :: Maybe String -> Annex String @@ -141,8 +142,10 @@ probeCrippledFileSystem = do -- Should be unable to write to the file, unless -- running as root, but some crippled -- filesystems ignore write bit removals. - unlessM - not <$> catchBoolIO (writeFile f "2" >> return True) + ifM ((== 0) <$> getRealUserID) + ( return True + , not <$> catchBoolIO (writeFile f "2" >> return True) + ) #endif checkCrippledFileSystem :: Annex () diff --git a/debian/changelog b/debian/changelog index b81a533283..20c28e94f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ git-annex (5.20150813) UNRELEASED; urgency=medium * Avoid building the assistant on the hurd, since an inotify equivilant is not yet implemented in git-annex for the hurd. * importfeed --relaxed: Avoid hitting the urls of items in the feed. + * Fix reversion in init when ran as root, introduced in version 5.20150731. -- Joey Hess Wed, 12 Aug 2015 14:31:01 -0400 diff --git a/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__.mdwn b/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__.mdwn index 68f9865040..cad21f5c90 100644 --- a/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__.mdwn +++ b/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__.mdwn @@ -41,3 +41,5 @@ Debian sid 5.20150812-2 # End of transcript or log. """]] + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__/comment_1_82480202831a08388f9f716abfaa0340._comment b/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__/comment_1_82480202831a08388f9f716abfaa0340._comment new file mode 100644 index 0000000000..2374185064 --- /dev/null +++ b/doc/bugs/decides_that_FS_is_crippled_under_cowbuilder___40__symlinks_supported_etc__41__/comment_1_82480202831a08388f9f716abfaa0340._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2015-08-19T16:22:31Z" + content=""" +Actually, it does detect a crippled FS when run as root here. I guess you +had some version confusion going on, since this problem was introduced in a +recent release. Fixing.. +"""]]