úÎYPUû*      !"#$%&'( )  Safe-Inferredcalls *) but will remove the target and retry if  * raises EEXIST. None=FIXME: We should really get this value from the mount table. 8Return the device represented by a device node, such as /dev/sda2. F Returns Nothing if there is an exception trying to stat the node, or 3 if the node turns out not to be a special device. +8Removable devices, such as USB keys, are in this group. ,9Traverse a directory and return a list of all the (path,  fileStatus) pairs. -./ 01+23,45   .-/ 01+23,45 Safe-Inferred# - unmounts all mount points below  belowPath  /proc/9mounts must be present and readable. Because of the way " linux handles changeroots, we can't trust everything we see in  /proc/5mounts. However, we make the following assumptions:  = there is a one-to-one correspondence between the entries in  /proc/"mounts and the actual mounts, and A (2) every mount point we might encounter is a suffix of one of ! the mount points listed in /proc/mounts (because being in a  a chroot doesn' t affect /proc/ mounts.) So we can search /proc/(mounts for an entry has the mount point ? we are looking for as a substring, then add the extra text on ? the right to our path and try to unmount that. Then we start 5 again since nested mounts might have been revealed. *For example, suppose we are chrooted into  /home/david/ environments/sid and we call umountBelow /proc. We  might see the mount point /home/david/ environments/sid/proc/bus/usb  in /proc/#mounts, which means we need to run umount /proc/bus/usb.  See also: 6 6?umountSucceeded - predicated suitable for filtering results of  77$ - unescape function for strings in /proc/mounts 88 - /proc/mount stytle string escaper & - run umount with the specified args * NOTE: this function uses exec, so you do not need to shell-escape  NOTE: we don'5t use the umount system call because the system call  is not smart enough to update /etc/mtab Lazy (umount -l flag) if true canonicalised, absolute path Upaths that we attempted to umount, and the responding output from the umount command 678678NoneDeprecated: Use UData.ByteString.Lazy.Char8.readFile path >>= return . show . Data.Digest.Pure.MD5.md5 Deprecated: Use [Data.ByteString.Lazy.Char8.readFile path >>= Data.ByteString.Lazy.Char8.writeFile (path ++ ".gz")  Safe-Inferred>Kill the processes whose working directory is in or under the  given directory.  Safe-InferredHConcatenate two paths, making sure there is exactly one path separator. Use dropFileName Use takeFileName resolve all references to ., .., extra slashes, and symlinks 99 Safe-Inferred 9Traverse a directory and return a list of all the (path,  fileStatus) pairs. :BTraverse a file system directory applying D to every directory, F : to every non-directory file, and M to every mount point. ! NOTE: It is tempting to use the find function to returns a list A of the elements of the directory and then map that list over an  unmount and remove/ function. However, because we are unmounting B as we traverse, the contents of the file list may change in ways ' that could confuse the find function. !ARecursively remove a directory contents on a single file system.  The adjective "Safely" refers to these features: " 1. It will not follow symlinks > 2. If it finds a directory that seems to be a mount point, 8 it will attempt to unmount it up to five times. If it - still seems to be a mount point it gives up  3. It doesn't use proc$mounts, which is ambiguous or wrong  when you are inside a chroot. "$Like removeRecursiveSafely but doesn't remove any files, just A unmounts anything it finds mounted. Note that this can be much 2 slower than Mount.umountBelow, use that instead. #>Rename src to dst, and if dst already exists move it to dst~.  If dst~ exists it is removed. $Itemporarily change the working directory to |dir| while running |action| %Mcreate a temporary directory, run the action, remove the temporary directory C the first argument is a template for the temporary directory name d the directory will be created as a subdirectory of the directory returned by getTemporaryDirectory C the temporary directory will be automatically removed afterwards. ' your working directory is not altered ; :!"#$%& !"#$%& !"#$%& ; :!"#$%&non-portable (requires POSIX) provisionaljeremy@seereason.com Safe-Inferred'calls crypt(3) <'key salt encrypted password ''<'  Safe-Inferred=.chroot changes the root directory to filepath I NOTE: it does not change the working directory, just the root directory * NOTE: will throw IOError if chroot fails (*fchroot runs an IO action inside a chroot C fchroot performs a chroot, runs the action, and then restores the @ original root and working directory. This probably affects the A chroot and working directory of all the threads in the process,  so... 3 NOTE: will throw IOError if internal chroot fails )=The ssh inside of the chroot needs to be able to talk to the D running ssh-agent. Therefore we mount --bind the ssh agent socket ? dir inside the chroot (and umount it when we exit the chroot. >?@=()()()>?@=()A     !"#$%&'()*+,-./01 2 3456789:;<=>?@ABCDEFGH I J K LMUnixutils-1.52System.Unix.FilesSystem.Unix.SpecialDeviceSystem.Unix.MountSystem.Unix.MiscSystem.Unix.KillByCwdSystem.Unix.FilePathSystem.Unix.DirectorySystem.Unix.CryptSystem.Unix.ChrootforceSymbolicLink SpecialDevice sysMountPointofPathrootPartofNode ofNodeStatus ofSysName ofSysPath ofMajorMinorofDevNotoDevnonodenodes splitPart diskOfPartsysNamesysDir getAllDisksgetAllPartitions getAllCdromsgetAllRemovable umountBelowumount isMountPointmd5sumgzip killByCwd<++>dirNamebaseNamerealpathfindremoveRecursiveSafelyunmountRecursiveSafelyrenameFileWithBackupwithWorkingDirectorywithTemporaryDirectorymkdtempcryptfchrootuseEnv unix-2.6.0.1System.Posix.FilescreateSymbolicLink floppyGroupdirectory_findCharacterDevice BlockDeviceparseSysDevFile diskGroup cdromGroupgetDisksInGroupisPartdirnamebasenameumountSucceededunescapeescape c_realpathtraverse c_mkdtempc_cryptchrootc_chroot forceList forceList'