git-annex/Remote
Joey Hess 033e4b086f
audit all openFd and dupping for close-on-exec
Made all uses of openFd and dup set the close-on-exec flag, with a few
exceptions when starting a git-annex daemon.

Made openFdWithMode be used everywhere, rather than openFd.
Adding a new parameter to it ensures I checked everything.
And will help to make sure this gets considered in the future when
opening fds.

In lockPidFile, the only thing that keeps the pid file locked, once
daemonize re-runs the command in a new session, is that the fd is
inherited.

In Utility.LogFile.redir, the new fd it dups to does not have the
close-on-exec flag set, because this is used to set up the stdout and
stderr fds, which need to be inherited by child processes.

Same in Assistant.startDaemon where the browser gets started with the
original stdout and stderr.

This does nothing about uses of openFile and similar!

Sponsored-By: mycroft
2025-09-04 16:01:41 -04:00
..
Directory more OsPath conversion (464/749) 2025-02-04 13:35:17 -04:00
External more OsPath conversion 2025-01-28 16:31:19 -04:00
Helper reject an insecure configuration 2025-08-22 13:38:14 -04:00
List findcomputed: New command, displays information about computed files. 2025-03-18 12:55:48 -04:00
Rsync more OsPath conversion 2025-01-28 16:31:19 -04:00
WebDAV more OsPath conversion 2025-01-28 15:46:00 -04:00
Adb.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
BitTorrent.hs Added remote.name.annex-web-options config 2025-04-01 10:17:38 -04:00
Borg.hs more OsPath conversion (650/749) 2025-02-07 17:03:31 -04:00
Bup.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
Compute.hs avoid shadowing warning 2025-03-19 14:46:24 -04:00
Ddar.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
Directory.hs audit all openFd and dupping for close-on-exec 2025-09-04 16:01:41 -04:00
External.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
GCrypt.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
Git.hs fix handling of linked worktrees on filesystems w/o symlinks 2025-07-14 13:20:39 -04:00
GitLFS.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
Glacier.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
Hook.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
HttpAlso.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
List.hs mask remotes, partial implementation 2025-04-10 13:10:07 -04:00
Mask.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
P2P.hs added retrieveKeyFileInOrder and ORDERED to external special remote protocol 2024-10-15 15:40:14 -04:00
Rclone.hs rclone special remote 2024-04-17 15:20:37 -04:00
Rsync.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
S3.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00
Tahoe.hs fix specialRemote confusion with tahoe 2025-08-22 13:24:53 -04:00
Web.hs Added remote.name.annex-web-options config 2025-04-01 10:17:38 -04:00
WebDAV.hs Don't allow the type of encryption of an existing special remote to be changed. 2025-08-21 13:41:00 -04:00