{"push_id":812812061,"size":1,"distinct_size":1,"ref":"refs/heads/userns-sysctl-v4","head":"82adb7f1476a4d3065512e33fa6a62156443870a","before":"0b0b4b8f8d8f8a1759daccda69eb28eccb3a9cba","commits":[{"sha":"82adb7f1476a4d3065512e33fa6a62156443870a","author":{"email":"10c18fcb898ee6b17d6575d444b125d10b3f4d6a@canonical.com","name":"Tycho Andersen"},"message":"sysctl: move sysctl calls to usernsd\n\nWhen in a userns, tasks can't write to certain sysctl files:\n\n(00.009653)      1: Error (sysctl.c:142): Can't open sysctl kernel/hostname: Permission denied\n\nSee inline comments for details on affected namespaces.\n\nMostly for my own education in what is required to port something to be\nuserns restorable, I ported the sysctl stuff. A potential concern for this\npatch is that copying structures with pointers around is kind of gory. I\ndid it ad-hoc here, but it may be worth inventing some mechanisms to make\nit easier, although I'm not sure what exactly that would look like\n(potentially re-using some of the protobuf bits; I'll investigate this more\nif it looks helpful when doing the cgroup user namespaces port?).\n\nAnother issue is that there is not a great way to return non-fd stuff in\nmemory right now from userns_call; one of the little hacks in this code\nwould be \"simplified\" if we invented a way to do this.\n\nv2: coalesce the individual struct sysctl_req requests into one big\n    sysctl_userns_req that is in a contiguous region of memory so that we\n    can pass it via userns_call. Hopefully nobody finds my little ascii\n    diagram too offensive :)\nv3: use the fork/setns trick to change the syctl values in the right ns for\n    IPC/UTS nses; see inline comment for details\nv4: only use sysctl_userns_req when actually doing a userns_call.\n\nSigned-off-by: Tycho Andersen <tycho.andersen@canonical.com>","distinct":true,"url":"https://api.github.com/repos/tych0/criu/commits/82adb7f1476a4d3065512e33fa6a62156443870a"}]}