Fix reversion in init when ran as root, introduced in version 5.20150731.
This commit is contained in:
parent
1e3d7ad4e0
commit
c242e248e8
4 changed files with 17 additions and 2 deletions
|
@ -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 ()
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -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 <id@joeyh.name> Wed, 12 Aug 2015 14:31:01 -0400
|
||||
|
||||
|
|
|
@ -41,3 +41,5 @@ Debian sid 5.20150812-2
|
|||
|
||||
# End of transcript or log.
|
||||
"""]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -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..
|
||||
"""]]
|
Loading…
Reference in a new issue