{"id":18151245,"url":"https://github.com/msantos/fchmodexec","last_synced_at":"2025-07-08T16:35:23.243Z","repository":{"id":136621410,"uuid":"349046623","full_name":"msantos/fchmodexec","owner":"msantos","description":"fchmod(2) inherited file descriptors before exec(3)'ing a command","archived":false,"fork":false,"pushed_at":"2024-12-02T12:38:34.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-13T05:30:10.509Z","etag":null,"topics":["exec","fd"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msantos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-18T11:25:02.000Z","updated_at":"2024-12-02T12:38:37.000Z","dependencies_parsed_at":"2024-06-12T15:36:12.089Z","dependency_job_id":"bf16c722-8da1-4486-8c66-ad132f51070f","html_url":"https://github.com/msantos/fchmodexec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Ffchmodexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Ffchmodexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Ffchmodexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Ffchmodexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msantos","download_url":"https://codeload.github.com/msantos/fchmodexec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247568835,"owners_count":20959753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exec","fd"],"created_at":"2024-11-02T01:07:03.063Z","updated_at":"2025-04-06T23:29:27.930Z","avatar_url":"https://github.com/msantos.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SYNOPSIS\n\nfchmodexec *mode* *fd* *...* -- *cmd* *...*\n\nLD_PRELOAD=libdisablefchmod.so *command* *...*\n\n# DESCRIPTION\n\nfchmodexec - fchmod(2) inherited file descriptors before exec(3)'ing\na command\n\n`fchmodexec` runs as part of an exec chain to change the permissions of\nany file descriptors inherited from the parent process before executing\na program.\n\nlibdisablefchmod: Disables use of fchmod(2) on stdin and stdout by\ndynamically linked executables.\n\n# EXAMPLES\n\n## fchmodexec\n\n```\n$ umask 077; (fchmodexec 644 1 -- ls -al out) \u003e out\n$ cat out\n-rw-r--r-- 1 msantos msantos 0 Mar 18 07:32 out\n$ ls -al out\n-rw-r--r-- 1 msantos msantos 48 Mar 18 07:32 out\n```\n\n## libdisablefchmod\n\n```\n$ umask 022; (LD_PRELOAD=libdisablefchmod.so fchmodexec 111 1 -- ls -al out) \u003e out\n$ cat out\n-rw-r--r-- 1 msantos msantos 0 Mar 18 07:32 out\n$ ls -al out\n-rw-r--r-- 1 msantos msantos 48 Mar 18 07:32 out\n```\n\n# OPTIONS\n\nNone.\n\n# BUILDING\n\n```\nmake\n\n# also build libdisablefchmod\nmake all\n\n# statically linked executable\n./musl-make\n```\n\n# SEE ALSO\n\n*exec(3)*, *fchmod*(2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Ffchmodexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsantos%2Ffchmodexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Ffchmodexec/lists"}