port 80ãéãããã«ã¯root権éãå¿ è¦ã ããéãããã¨ã¯ã»ãã¥ãªãã£ã¼ãªã¹ã¯ãæå°éã«ããããã«ä¸è¬ã¦ã¼ã¶æ¨©éã«éæ ¼ããããã¨ããWebãµã¼ããGoã§æ¸ãä¾ã§ãã ã追è¨3ã ä¸è¨ã®ä¾ã§ã¯Linuxã§åä½ãããå ´åã«ä¸ååã§ãã Linuxã§ã¯setuidãå¼ã³åºããã¹ã¬ããã«ããå¹ããªãã®ã§ã以ä¸ã®ä¾ããã®ã¾ã¾Linuxã§åããã¨syscall.Setuid()ã¯æåãã¾ãããHTTPã®Handlerã§ã¯å¥ã¹ã¬ããã§åããã¨ããããããrootã®ã¾ã¾ã§åä½ãããã¨ã«ãªãã¾ãã methaneããã®ã³ã¡ã³ããåç §ãã ãã rootã§èµ·åããç¶æ ã§":80"ãlistenã㦠syscall.Setuid() ã§ä¸è¬ã¦ã¼ã¶ã«ãªã http.Serve()ãã package main import ( "net" "net/http" "syscall" "log" ) func m
{{#tags}}- {{label}}
{{/tags}}