)]}'
{"nova/virt/images.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"22a29703271ce751ba0793dae3b041ce10d87d0e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    out, err \u003d utils.execute(\"ls\", \"-lhd\", path)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    LOG.warning(_(\"File permissions are: %r, %r\"), out, err)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    out, err \u003d utils.execute(\u0027env\u0027, \u0027LC_ALL\u003dC\u0027, \u0027LANG\u003dC\u0027,"},{"line_number":60,"context_line":"                             \u0027qemu-img\u0027, \u0027info\u0027, path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BCWg%3D","line":57,"updated":"2013-12-03 07:26:41.000000000","message":"Why is this a warning? Whats wrong with it that we want admins to see it ?","commit_id":"b035897980f546ceecca033a16bde4ae4bdae214"},{"author":{"_account_id":7808,"name":"Xavier Queralt","email":"xqueralt@gmail.com","username":"xqueralt"},"change_message_id":"e0d94a7031ab1981c3d2ffc9f5cac27ed90178e3","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    out, err \u003d utils.execute(\"ls\", \"-lhd\", path)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    LOG.warning(_(\"File permissions are: %r, %r\"), out, err)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    out, err \u003d utils.execute(\u0027env\u0027, \u0027LC_ALL\u003dC\u0027, \u0027LANG\u003dC\u0027,"},{"line_number":60,"context_line":"                             \u0027qemu-img\u0027, \u0027info\u0027, path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9vwg%3D","line":57,"in_reply_to":"AAAATn%2F%2BCWg%3D","updated":"2013-12-06 13:37:05.000000000","message":"This warning was not inteded to get to the final patch, I was just checking the file permissions.","commit_id":"b035897980f546ceecca033a16bde4ae4bdae214"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"e9746fb702a4b849c7e139d9d47b1bb5fbac4233","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"                out_path \u003d os.path.join(tmpdir, snapshot_name)"},{"line_number":1490,"context_line":"                if live_snapshot:"},{"line_number":1491,"context_line":"                    # NOTE(xqueralt): libvirt needs o+x in the temp directory"},{"line_number":1492,"context_line":"                    os.chmod(tmpdir, 0o701)"},{"line_number":1493,"context_line":"                    self._live_snapshot(virt_dom, disk_path, out_path,"},{"line_number":1494,"context_line":"                                        image_format)"},{"line_number":1495,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9tsc%3D","line":1492,"updated":"2013-12-06 20:10:50.000000000","message":"Would it be more correct to add o+x to the existing permissions, than explicitly setting it to 701?","commit_id":"8a34fc3d48c467aa196f65eed444ccdc7c02f19f"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"d32a6757c4d7f308300b610610d47c87773733ea","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"                out_path \u003d os.path.join(tmpdir, snapshot_name)"},{"line_number":1490,"context_line":"                if live_snapshot:"},{"line_number":1491,"context_line":"                    # NOTE(xqueralt): libvirt needs o+x in the temp directory"},{"line_number":1492,"context_line":"                    os.chmod(tmpdir, 0o701)"},{"line_number":1493,"context_line":"                    self._live_snapshot(virt_dom, disk_path, out_path,"},{"line_number":1494,"context_line":"                                        image_format)"},{"line_number":1495,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9QPA%3D","line":1492,"in_reply_to":"AAAATn%2F9jJw%3D","updated":"2013-12-13 13:29:34.000000000","message":"Ok, I\u0027m fine with that then.","commit_id":"8a34fc3d48c467aa196f65eed444ccdc7c02f19f"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"949d1ec9df583684a4fa939ec8ab6ad3a47897d5","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"                out_path \u003d os.path.join(tmpdir, snapshot_name)"},{"line_number":1490,"context_line":"                if live_snapshot:"},{"line_number":1491,"context_line":"                    # NOTE(xqueralt): libvirt needs o+x in the temp directory"},{"line_number":1492,"context_line":"                    os.chmod(tmpdir, 0o701)"},{"line_number":1493,"context_line":"                    self._live_snapshot(virt_dom, disk_path, out_path,"},{"line_number":1494,"context_line":"                                        image_format)"},{"line_number":1495,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9jJw%3D","line":1492,"in_reply_to":"AAAATn%2F9tsc%3D","updated":"2013-12-10 11:07:01.000000000","message":"I think setting 701 explicitly is better, because it is a defensive approach, against accidentally having permissions which are too broad and would thus be a security risk.","commit_id":"8a34fc3d48c467aa196f65eed444ccdc7c02f19f"},{"author":{"_account_id":7808,"name":"Xavier Queralt","email":"xqueralt@gmail.com","username":"xqueralt"},"change_message_id":"6546437c2863f01002d17eb06c67208426339807","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"                out_path \u003d os.path.join(tmpdir, snapshot_name)"},{"line_number":1490,"context_line":"                if live_snapshot:"},{"line_number":1491,"context_line":"                    # NOTE(xqueralt): libvirt needs o+x in the temp directory"},{"line_number":1492,"context_line":"                    os.chmod(tmpdir, 0o701)"},{"line_number":1493,"context_line":"                    self._live_snapshot(virt_dom, disk_path, out_path,"},{"line_number":1494,"context_line":"                                        image_format)"},{"line_number":1495,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9sTc%3D","line":1492,"in_reply_to":"AAAATn%2F9tsc%3D","updated":"2013-12-07 09:58:47.000000000","message":"With os.chmod it is not possible to add a mode, you\u0027ve to specify the whole mode. To do so we would have to spawn a chmod process which I think is excessive.\nBesides this, tempfile creates the directory with 700 mode by default which makes it feasible to use 701 here.","commit_id":"8a34fc3d48c467aa196f65eed444ccdc7c02f19f"}],"nova/virt/libvirt/utils.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"22a29703271ce751ba0793dae3b041ce10d87d0e","unresolved":false,"context_lines":[{"line_number":656,"context_line":"            try:"},{"line_number":657,"context_line":"                return function(*args, **kwargs)"},{"line_number":658,"context_line":"            finally:"},{"line_number":659,"context_line":"                os.umask(old_mask)"},{"line_number":660,"context_line":"        return wrapper"},{"line_number":661,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BCVM%3D","line":659,"updated":"2013-12-03 07:26:41.000000000","message":"This is process-wide( http://man7.org/linux/man-pages/man7/pthreads.7.html ) - so if we are rescheduled (remember, we have green threads *and* db pools), or if something is running threaded in the server for some reason, we\u0027ll break it by doing this.\n\nA safe way is to set the umask to the most restrictive value needed on process start up and chmod files to broader access where needed.","commit_id":"b035897980f546ceecca033a16bde4ae4bdae214"},{"author":{"_account_id":7808,"name":"Xavier Queralt","email":"xqueralt@gmail.com","username":"xqueralt"},"change_message_id":"e0d94a7031ab1981c3d2ffc9f5cac27ed90178e3","unresolved":false,"context_lines":[{"line_number":656,"context_line":"            try:"},{"line_number":657,"context_line":"                return function(*args, **kwargs)"},{"line_number":658,"context_line":"            finally:"},{"line_number":659,"context_line":"                os.umask(old_mask)"},{"line_number":660,"context_line":"        return wrapper"},{"line_number":661,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9vv8%3D","line":659,"in_reply_to":"AAAATn%2F%2BCVM%3D","updated":"2013-12-06 13:37:05.000000000","message":"Thanks for your suggestion. You\u0027re right, I didn\u0027t take into account we might be running different threads sharing the same umask.","commit_id":"b035897980f546ceecca033a16bde4ae4bdae214"}]}
