{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/20454","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/20454/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/20454/comments","events_url":"https://api.github.com/repos/golang/go/issues/20454/events","html_url":"https://github.com/golang/go/issues/20454","id":230435536,"number":20454,"title":"syscall: add mechanism to steal the controlling terminal from a different session group on Linux","user":{"login":"devimc","id":13009432,"avatar_url":"https://avatars3.githubusercontent.com/u/13009432?v=3","gravatar_id":"","url":"https://api.github.com/users/devimc","html_url":"https://github.com/devimc","followers_url":"https://api.github.com/users/devimc/followers","following_url":"https://api.github.com/users/devimc/following{/other_user}","gists_url":"https://api.github.com/users/devimc/gists{/gist_id}","starred_url":"https://api.github.com/users/devimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devimc/subscriptions","organizations_url":"https://api.github.com/users/devimc/orgs","repos_url":"https://api.github.com/users/devimc/repos","events_url":"https://api.github.com/users/devimc/events{/privacy}","received_events_url":"https://api.github.com/users/devimc/received_events","type":"User","site_admin":false},"labels":[{"id":373540105,"url":"https://api.github.com/repos/golang/go/labels/FeatureRequest","name":"FeatureRequest","color":"bfd4f2","default":false},{"id":373401956,"url":"https://api.github.com/repos/golang/go/labels/NeedsDecision","name":"NeedsDecision","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars1.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"assignees":[{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars1.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/56","html_url":"https://github.com/golang/go/milestone/56","labels_url":"https://api.github.com/repos/golang/go/milestones/56/labels","id":2473074,"number":56,"title":"Go1.10","description":"","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars2.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":153,"closed_issues":13,"state":"open","created_at":"2017-04-21T19:22:29Z","updated_at":"2017-05-31T03:50:21Z","due_on":"2018-01-31T08:00:00Z","closed_at":null},"comments":8,"created_at":"2017-05-22T15:35:37Z","updated_at":"2017-05-31T03:50:21Z","closed_at":"2017-05-31T03:50:21Z","body":"### What version of Go are you using (`go version`)?\r\ngo version devel +5e79787 Mon May 22 13:44:12 2017 +0000 linux/amd64\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/X/gopath/\"\r\nGORACE=\"\"\r\nGOROOT=\"/home/X/gopath/src/github.com/golang/go-linux-amd64-bootstrap\"\r\nGOTOOLDIR=\"/home/X/gopath/src/github.com/golang/go-linux-amd64-bootstrap/pkg/tool/linux_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"gcc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build111441286=/tmp/go-build -gno-record-gcc-switches\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\n```\r\n\r\n### What did you do?\r\n```\r\ncmd := exec.Command(config.Path)\r\ncmd.Env = os.Environ()\r\nf, err = os.OpenFile(params.Console, os.O_RDWR, 0660)\r\nif err != nil {\r\n\treturn -1, err\r\n}\r\ncmd.Stdin = f\r\ncmd.Stdout = f\r\ncmd.Stderr = f\r\ncmd.SysProcAttr = &syscall.SysProcAttr{\r\n\t// Create Session\r\n\tSetsid: true,\r\n\t// Set Controlling terminal to Ctty\r\n\tSetctty: true,\r\n\tCtty:    int(f.Fd()),\r\n}\r\nif err := cmd.Start(); err != nil {\r\n\treturn -1, err\r\n}\r\n```\r\n\r\n### What did you expect to see?\r\nA processes running using the assigned terminal\r\n\r\n### What did you see instead?\r\n```\r\nfork/exec X: operation not permitted\r\n```\r\n\r\n### Solution\r\nAllow spawned processes steal the terminal\r\n"}}
{"actor":{"display_login":"gopherbot"}}