From patchwork Tue Apr 25 20:35:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guido Trentalancia X-Patchwork-Id: 9699703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7E0F360224 for ; Tue, 25 Apr 2017 20:35:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AD0A28471 for ; Tue, 25 Apr 2017 20:35:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F53E284D4; Tue, 25 Apr 2017 20:35:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from emsm-gh1-uea11.nsa.gov (emsm-gh1-uea11.nsa.gov [8.44.101.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F9BA28471 for ; Tue, 25 Apr 2017 20:35:52 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.37,251,1488844800"; d="scan'208";a="5209617" IronPort-PHdr: =?us-ascii?q?9a23=3AvmY7EBRC1Q+ZUpONregtA/r24dpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa68ZxeDt8tkgFKBZ4jH8fUM07OQ6PG+HzBaqs/c6TgrS99lb1c9k8?= =?us-ascii?q?IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBo?= =?us-ascii?q?KevrB4Xck9q41/yo+53Ufg5EmCexbal8IRiyrAjdrMYbjZVtJqosyhbFv2ZDdv?= =?us-ascii?q?hLy29vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfM?= =?us-ascii?q?TQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklD?= =?us-ascii?q?sLOjgk+2/Kksx/lqdbrhC/qBNl3oHbfpuVOvp/fqzDedMVWHdKUMRPWCNbH4yz?= =?us-ascii?q?cZEPBPccM+lEqIn9vVoOrR2xBQKxAO/ixCNEinrw0KI0yeQhFRzN0hImEdwArX?= =?us-ascii?q?/YqMz5OLoOXeywyqTD0DfNYO5M2Trl64bGbxAvr++CU71yf8re1U4hGAzKgFWI?= =?us-ascii?q?q4HpIj2Y2foWs2WA8+ptV/iih3I9pg1toDWiwNonhInThoISz1DJ7SR3wJs0Jd?= =?us-ascii?q?KlT05wfMCqEIFOuCGcK4t5WMciTHtuuCkmy70Jo4OwcS8FyJQ6xh7QdvuHfpOU?= =?us-ascii?q?4hL5SumRJyt4i2hheL2lgRa97UmgxffmWsmyzllKsjNIn9/RvX4Ozxze8tWLR/?= =?us-ascii?q?Ry80u72TuDyhrf5v9LLEwqj6bXNoYtz7o+m5YJvknPAzX6lUrqgKOMckgp/PWj?= =?us-ascii?q?5f79bbX8vJCcMpd5igT5MqszhMOyGf84Mg0SX2iD/uS8yaHj8VX5QLpUiv02lb?= =?us-ascii?q?HUsIzAKsQBp665HhRV3pw/6xe/Ezim0NMYkWMBLF1ZYxKIk5LlO1TPIPD8Ffu/?= =?us-ascii?q?glKsnyl3x/3eI7HsDZrAImLDnbv8Z7px9UFRxBQpwdxC/55UD6sOIPP3Wk//rt?= =?us-ascii?q?zYCRo5PhSvw+n5DNV914UeWX+AA6OAK6zStkKI5uQzLOaSf48Yoyr9Kvg56P7u?= =?us-ascii?q?in81g1kdfbKz0pcNZ3C4GepmL12DYXXwmtcBDXsKvg0mQezoj12CVyRcZ2qyX6?= =?us-ascii?q?0m4DE2E4CmDYDFRoComrOBxzu7EYNMZmBdEFyMFm3od4qcUfcWdC2SOtNhkiAD?= =?us-ascii?q?VbW5SY8h1wuhuxP5y7p8KerU/CwYtYz42dh74+3TiB4z+idpD8Sbz2GNUnt4nm?= =?us-ascii?q?QSRz85xKp/u1Byyk+f0ahkhPxVDdJS5/JNUgc/K5Hc1fd3C97sVQ3cedeJUkyp?= =?us-ascii?q?Qs28ATE2TNI+3cMBY1pnF9WllBDD0DKgA6UJmLyTGJw07qXc0mDsKMlhznbG06?= =?us-ascii?q?8hj0U7TsZUK22pmLR/9wnSBo7OlUWVjaCqeroA3CTV7meM0XKOvF1EUA53SajK?= =?us-ascii?q?QGwfaVHMrdni+kzCSLquBqg9PQta1c6OMK1KZcP1jV9eXvfsJMzeY36tm2e3HR?= =?us-ascii?q?uJxrKNbI3se2gG2SXdDFEIkwEV/XqcMwgxHD2ho2HfDDxwC13jeUXs/vdiqHmj?= =?us-ascii?q?VE870xmKb1F917qy4hMam+ScROkJ3rIFoycssC10E0yn39LXENqAvw5hc79Abt?= =?us-ascii?q?wj+ltH0njZtwNlNJy6M69inkIecxhwv0722RV3EJ9Pkc42o3Mr1wp/MqeY0EtA?= =?us-ascii?q?dz+BxpDxNKbXJnP1/BC1ZK7cwkve38qO+qcT9PQ4rE3uvAKzGUoh9HVnzsJY03?= =?us-ascii?q?iG6ZXJCwoSTIj9UkEt9xh1v7vaeDUy55vI1X1wNqm5qiXN1M8zBOsk1BmgZcxS?= =?us-ascii?q?P7mYGw/3CcEaANKuKOMykVizch0EJPxS9LIzP86+bPuG1rSrPOF7nDK6lmlH+4?= =?us-ascii?q?Z90kWC9ip5UOHI2YwJw/eG0QubTz38lkuustjrmYBYYjEfBmS+xjLgBI5NeKJy?= =?us-ascii?q?Z50LBHywI8Kp3NVxnIPtW3tC+F6kHVMG19ejeQCOYFzlwQ1QyUMXrGS7mSSl0j?= =?us-ascii?q?N0kismrq6E0SPSxOTicQYINXRQRGl+l1vsJ5a7j8wCVkiycwcpjAel5Vr9x6VD?= =?us-ascii?q?oqR/Lm3TQUNWcCjtNGxtSLW/tqCFY8JV75MoqypXWvymYV+GUr79vwca0yT7Em?= =?us-ascii?q?tAxTA0ay2qupLjnxBglG2dLHFzrHzWecxrwRff5drcSuRL3joBXiV4jiPXBlek?= =?us-ascii?q?Ndmz4dqUj4vDsvy5V2+5Up1TcDLrzZ+ZuCug+2JqBRy/n/aumtzoCgU6yjf719?= =?us-ascii?q?hsVSXJsBn8eZPn16KkPuJ7ZkNoHkPz69JmGoFilYs9nIsQ2X8ehpWR43UHi3v8?= =?us-ascii?q?MdJV2K/ld3oNWCIEw8XP7Ajiwk1jIWqDx5jlWXWF3sthe966b3sO2i0n8sBKDL?= =?us-ascii?q?2Y46ZekSRupVq4qR7RYf97njoGzPsi9Hgag+YVtwY3yCWSHKwSF1FCPSPwjxSI?= =?us-ascii?q?88y+rKJPaWasb7ew0lF+kMuiDL6cpAFcQ3D5dYk+HSNq6cV/Kl3M2mXp6o74YN?= =?us-ascii?q?nQcc4TthqMnhfeiehaNYk8luQMhSV6OWLxp3slxPAnjRZ2x5G1oJCHK3lx/KK+?= =?us-ascii?q?GhNYLif6Z94X+jz2kalen9qW3oC2EpVvADoLWoHkTfWyEDIdrf7nLRqBECUgqn?= =?us-ascii?q?eHHrrSBRWf51p7oH/UHJCrMn6WKGMfzdp8WBmXPFZfjxwMXDUmgp45ERinxNT7?= =?us-ascii?q?f0dk4jAe+Eb4pQFKyuJ0KRb/SHzSpBqzajgqUpifNwBa7hpF50fIK8yR8vx8Hy?= =?us-ascii?q?9f/p27owyCNHaXZwJWAmEVQkaEHUzsPqGy5dnc9OiVHuS+IOHIYbWSruxeUuyF?= =?us-ascii?q?xZyx3YR7+DaMLN+APmF4D/082EpMQ2x2G9jDlzUIUSwXmDrHb9SHqxek5i13ss?= =?us-ascii?q?e//ezuWA314YuPD6VdMclz+x+sm6iOLOiQizhlKTZDypwD32fIx6YF0F4UlS5u?= =?us-ascii?q?ayGnEa4cui7VUKLQhqhXAgYBay9pOspE9ac80RNJOc7citL4zaR3geIwC1tfUl?= =?us-ascii?q?zhgM6pb9QQI26hLFPHGFqLNLOeKD3F2cH4f76zSaZKg+VSqx2wvi2bHlT5MTuf?= =?us-ascii?q?kjnlTRevMftDjCuDJhxRpJm9cgpxCWjkVN/mbAe7P8VvjT0u2rA0iHLKNXQHMT?= =?us-ascii?q?hgfUNNr7uQ4jlegvpjGmxO9H5lIfODmyaD4OnSMowWvudzAiRoi+Ja52w3y6NL?= =?us-ascii?q?4y5fWvN1nirSrsJpo1y9k+mA1CRoXwRUpjZMnoKLsl1oOb/F+ZlYRXbE4BUN4H?= =?us-ascii?q?2NBBQRudRqENLvu7pKxdjRj6/zMy1N89HJ/csGHcfYMsaHMGcnMRXzAj7YFRcF?= =?us-ascii?q?TTmoNWDfgExRiveS+WOJrpIisJjjhIIOSqNHVFwyDv4aEV5qHMIYL5d4QDwkiq?= =?us-ascii?q?WWjNUS6nqgthbRS9tVvovdWvKUH/rvNC6TjaNYaBsQ3bP4MYMTO5Xg1ExjZVl6?= =?us-ascii?q?m4LKFlHNUt9TuSJhbxU7oENX/Hh5VG0z1Frvahmx738LCf60ghk2hxNkbuQi7j?= =?us-ascii?q?js/Uk4K0HNpCsojkYxn9DljiqQcD71N6iwWo5XBzDzt0grPZPxWxx1YhGqnUx4?= =?us-ascii?q?KDfEQKpcj6dndWBukgPco5xPGP9CQq1CexAQ3/aXaOsr0VlHtiqnwkpH6vffBp?= =?us-ascii?q?t5iAsma5isoGxc2wh7dt46ObTQJLZVzlhXnq+OvS+p1uQvzwIFIkYN922SeCAW?= =?us-ascii?q?t0wUKrkmJy2o/uly5gCYnTtMZnQMXeIwov127kM9J/iAzyX43r5FNE++LeifIr?= =?us-ascii?q?iau2jHjs6IXkk/1kUTl0lG/Lh6y8EjfFSIV0o31rueCwwJNdbeKQFSd8dS7mbc?= =?us-ascii?q?fT2QvurX25J6I4W9G/vzQu+PrqYbn0WkHAgxH4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6wDFGapEM5V/Jxv4jMmqSVJmCiv5?= =?us-ascii?q?Zs7UagIkuPCKyecU/+V+K0z+aJcHLRIG0b319WFYQRdpSL7yulaZXPweZMF6SP?= =?us-ascii?q?zasn9V6ZhsK6gVPFiSvJbqtCtHqEgqAA81b789tjladk7InA1JVKb7pqUNig4d?= =?us-ascii?q?UdFjv09DB36wOWw55zrdVqRVl7OdCPoL/TWPVqYOSVlnMjtiQxOp35VjY7Spku?= =?us-ascii?q?xcsmNdhy9zvfck3TpnRBu6pC3tqLkA2T0l+L6isjUOp2ZJTuKEkyfHEV9D1ugF?= =?us-ascii?q?jb8AC3b+7lyxeHsDbIzy4LlhP8jv6Ykh43AiYRo+fiwGXOKgCzrzj6OJGYGPrt?= =?us-ascii?q?NchACXt8XKcLCzLDIeNrIjxhL/X3J9yBTRnA508GsXRTWt9N4kJJunNsYj3Seo?= =?us-ascii?q?HXXbe0sN4qNOq8v9r1kLTPE5aVl52mVsztCHRjERRMzIA2s1jBYraWtKcJJH8h?= =?us-ascii?q?IbGbMngjCWsala5A0UZinbEpi98InKgcjIwWU9Tcttxm/Oqa2FgpQq0XN7lNNw?= =?us-ascii?q?6i6Do28Sd+veU89tHnf/zIFfxvLiZ/+1qOAIVJNmyKi9UP8FKsSj+2u22ZVyWk?= =?us-ascii?q?+iwrQeHka5P/EYy7feUielVXeYVvqRf2iLhTY5PVb45QO0IV0vdMdKs0g9P/PN?= =?us-ascii?q?hp5Blg3uTLR0Sz6MpV/B0mMjN/8aeBgyuIi9fQwFUO8RaPKGKego3vI+FEMGb2?= =?us-ascii?q?XVEituF++2rVmtkZBnO3Vh5EX3evjt8gH6P9uRBBYEFZTWrphv9vymXmiBI2Nv?= =?us-ascii?q?zAVuPElo8OfSD1Extu5fc5aSmtjdnNZ73vQGd/dqNy0ypNgTlphl6YaKzMeAaQ?= =?us-ascii?q?vRwYrqJdHJvviYBOXSwF80dWFcTroUehj154E9Pt4lR73TA6VWsgkGCag9Wpwh?= =?us-ascii?q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yYdsYtMDISW9e86cDRIseIfQz9onYJr?= =?us-ascii?q?EQwPco3TJhpiw2qSOdAE1Bjgid6arfALp8xqFe5Wk/5/x2XEaPQzXbcmXcz4qp?= =?us-ascii?q?Fd9AxSlpoXD+y8XboPphNL1EqIFlUx82BndtK9Tc+y1ReX3l0wu1+RCgFXKRJy?= =?us-ascii?q?xKziwMIHkqa+d5yKdHqhvOat/F4EWbtqtp/ES2CAqMIqau1ZpXA8Xg0w65YG9N?= =?us-ascii?q?fCn9RMM+kepEiNtHOfBvXoO5GV2UdFDz?= X-IPAS-Result: =?us-ascii?q?A2E7DwDwsf9Y/wHyM5BbHAEBBAEBCgEBFwEBBAEBCgEBgwA?= =?us-ascii?q?pZIEJg2eLCJBaLWSXACWKGlcBAQEBAQEBAQIBAmgogjMKglkGAQIgBFUDCQEBF?= =?us-ascii?q?w0CIgQCAgMBUxkFiEyBSwSqTIFsOiYCiy6BC4clNoIvggOGDoJAHwEEiTqUB5N?= =?us-ascii?q?wgRaIdRcMhj+UGViBBm4KhGlEHIFlc4k2AQEB?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 25 Apr 2017 20:35:50 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id v3PKZWpi008770; Tue, 25 Apr 2017 16:35:35 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id v3PKZVre114660 for ; Tue, 25 Apr 2017 16:35:31 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id v3PKZUBP008767 for ; Tue, 25 Apr 2017 16:35:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1AXBwCwsf9Yhy0wWFFbHQEFAQsBgyuBDYEJg2eLCJBaLWSXBIYkAoRsAQIBAQEBAQITAQEBCgsJCCiFRQMDIwRiJQImAgJXGYhRgU+qTIFsOotWgQuHJTaCL4IDhg6CQB8FiTqUB5NwgRaIdSOGP5QZgV1uCoUtEAyBZXOJNgEBAQ X-IPAS-Result: A1AXBwCwsf9Yhy0wWFFbHQEFAQsBgyuBDYEJg2eLCJBaLWSXBIYkAoRsAQIBAQEBAQITAQEBCgsJCCiFRQMDIwRiJQImAgJXGYhRgU+qTIFsOotWgQuHJTaCL4IDhg6CQB8FiTqUB5NwgRaIdSOGP5QZgV1uCoUtEAyBZXOJNgEBAQ X-IronPort-AV: E=Sophos;i="5.37,251,1488862800"; d="scan'208";a="6029820" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 25 Apr 2017 16:35:29 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3A1Y099hE90IfJiODxZSxsDJ1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ7zpsqwAkXT6L1XgUPTWs2DsrQf2rSQ7/qrADFZqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRo?= =?us-ascii?q?LerpBIHSk9631+ev8JHPfglEnjSwbLdzIRmsogjdqMYajZZiJ6os1xDEvmZGd+?= =?us-ascii?q?NKyG1yOFmdhQz85sC+/J5i9yRfpfcs/NNeXKv5Yqo1U6VWACwpPG4p6sLrswLD?= =?us-ascii?q?TRaU6XsHTmoWiBtIDBPb4xz8Q5z8rzH1tut52CmdIM32UbU5Uims4qt3VBPljj?= =?us-ascii?q?oMOSMh8G7Nj8x+jrxUrwi8qBNh2Y7aYICVO+R6fqzAYNgUR3ROUdxMWCNfGIO3?= =?us-ascii?q?cpYBAPYGPeZCron9oVQOpga6CQSiGO/jzzlFjWL006InyeQsCQLI0hEgEdwQvn?= =?us-ascii?q?rbrtv1O7sVX++6w6fF1inDYvFM1Dvh8oXEbhIsrPeRVrxwa8rRzkwvGhvEgFWN?= =?us-ascii?q?qIzqIjSV3fkTvWiB8eVgU/6vhHQjqw5rpDig2sYshZPUjY8SxVDE6CR5z5syJd?= =?us-ascii?q?CjVE57e8CrEJ1Mty6AM4t5WMUiTH1puCkg0LEGv4C0fDQTxZkh2hXRaOSHfpCL?= =?us-ascii?q?7x7+TuqcIjR1iGhqdb+8nRq//kitxvX4W8S6ylpHoTdJnsPDu3wRzRDe7s6KQe?= =?us-ascii?q?Zn8Ei7wzaAzQXT5/lEIU8qkarbLIYszaQtlpoPsUTDBSr2mFnujKOMbEUr5Oeo?= =?us-ascii?q?6+X8YrX6uJCcLZV4igDiMqg2m8y/B/o3MhQWUmWY5Oiwzr7u8E7jTLhFjfA6iK?= =?us-ascii?q?bUvZDCKcQevKG5AgtV0og56xa4CjeryNsYnWQGLF1YfxKKlJTpO0vQL/D+Efew?= =?us-ascii?q?mVCsny1tx//aP73uGI/BLn7dn7f9Zbp98VJTyBIvzdBD4JJZEqoBL+z3Wk/wst?= =?us-ascii?q?zYExA4Pheow+fnFNp91oQeVXiJAq+CKqzeq1CI5uUxI7rEWIhAozv5Kv4499by?= =?us-ascii?q?nHQ5nhkbZqDv0pwJO16iGfEzDFiYbX2kvs0MF3sDugM4R+3jwAmNTD9fYF6uRa?= =?us-ascii?q?86+jg/AYStDI6FQI2x1u/SlBynF4FbMzgVQmuHFm3lIt7cVg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0FWBADwsf9Yhy0wWFFbHQEFAQsBGAEFA?= =?us-ascii?q?QsBgwCBDYEJg2eLCJBaLWSXBIYkAoRsAQEBAQEBAQECAQIQAQEBCgsJCCgvgjM?= =?us-ascii?q?KglkDAyMEYiUCJgICVxmIUYFPqkyBbDqLVoELhyU2gi+CA4YOgkAfBYk6lAeTc?= =?us-ascii?q?IEWiHUjhj+UGYFebgqFLRAMgWVziTYBAQE?= X-IPAS-Result: =?us-ascii?q?A0FWBADwsf9Yhy0wWFFbHQEFAQsBGAEFAQsBgwCBDYEJg2e?= =?us-ascii?q?LCJBaLWSXBIYkAoRsAQEBAQEBAQECAQIQAQEBCgsJCCgvgjMKglkDAyMEYiUCJ?= =?us-ascii?q?gICVxmIUYFPqkyBbDqLVoELhyU2gi+CA4YOgkAfBYk6lAeTcIEWiHUjhj+UGYF?= =?us-ascii?q?ebgqFLRAMgWVziTYBAQE?= X-IronPort-AV: E=Sophos;i="5.37,251,1488844800"; d="scan'208";a="5209610" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from authsmtp22.register.it (HELO authsmtp.register.it) ([81.88.48.45]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/DHE-RSA-AES128-SHA; 25 Apr 2017 20:35:28 +0000 Received: from [192.168.1.1] ([93.41.40.9]) by paganini32 with id CkbT1v0040BrE9Z01kbTsp; Tue, 25 Apr 2017 22:35:27 +0200 X-Rid: guido@trentalancia.net@93.41.40.9 Message-ID: <1493152517.17316.0.camel@trentalancia.net> Subject: [PATCH v3] libsemanage: remove lock files From: Guido Trentalancia To: selinux@tycho.nsa.gov Date: Tue, 25 Apr 2017 22:35:17 +0200 In-Reply-To: <1493150773.12050.2.camel@trentalancia.net> References: <58517705.198270.1492699110308@pim.register.it> <100DD2AB-228E-47B5-8058-C9F030AEA665@trentalancia.net> <201704251630.03844.russell@coker.com.au> <1493150773.12050.2.camel@trentalancia.net> X-Mailer: Evolution 3.24.0 Mime-Version: 1.0 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Do not use flock() for file locking, but instead use generic text files that keep track of the process ID (PID) of the locking process. Remove semanage read and transaction lock files upon releasing them. This third version fixes a bug in the previous version and also applies cleanly to the latest git tree. Signed-off-by: Guido Trentalancia --- src/Makefile | 2 src/semanage_store.c | 214 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 160 insertions(+), 56 deletions(-) --- a/src/Makefile 2017-04-25 22:27:38.105555427 +0200 +++ b/src/Makefile 2017-04-25 22:28:58.512555098 +0200 @@ -91,7 +91,7 @@ $(LIBA): $(OBJS) $(RANLIB) $@ $(LIBSO): $(LOBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -laudit -lselinux -lbz2 -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lm -lsepol -laudit -lselinux -lbz2 -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs ln -sf $@ $(TARGET) $(LIBPC): $(LIBPC).in ../VERSION --- a/src/semanage_store.c 2017-04-20 16:30:21.218209972 +0200 +++ b/src/semanage_store.c 2017-04-25 22:24:35.883556172 +0200 @@ -45,6 +45,8 @@ typedef struct dbase_policydb dbase_t; #include #include #include +#include +#include #include #include #include @@ -52,11 +54,24 @@ typedef struct dbase_policydb dbase_t; #include #include #include +#include #include #include #include #include +#include + +#ifndef CONFIG_BASE_SMALL +#define CONFIG_BASE_SMALL 0 +#endif + +#include + +#ifndef PID_MAX_DEFAULT +#define PID_MAX_DEFAULT 32768 +#endif + #include "debug.h" #include "utilities.h" @@ -76,6 +91,8 @@ enum semanage_file_defs { static char *semanage_paths[SEMANAGE_NUM_STORES][SEMANAGE_STORE_NUM_PATHS]; static char *semanage_files[SEMANAGE_NUM_FILES] = { NULL }; static int semanage_paths_initialized = 0; +static int pid_max; +static ssize_t pid_max_length; /* These are paths relative to the bottom of the module store */ static const char *semanage_relative_files[SEMANAGE_NUM_FILES] = { @@ -427,8 +442,23 @@ cleanup: int semanage_check_init(semanage_handle_t *sh, const char *prefix) { int rc; + int fd; + char root[PATH_MAX]; + ssize_t amount_read; + if (semanage_paths_initialized == 0) { - char root[PATH_MAX]; + pid_max = PID_MAX_DEFAULT; + pid_max_length = ceil(log10(PID_MAX_DEFAULT + 1)); + + fd = open("/proc/sys/kernel/pid_max", O_RDONLY); + if (fd > 0) { + char sysctlstring[pid_max_length]; + amount_read = read(fd, sysctlstring, pid_max_length); + if (amount_read > 0) { + pid_max = atoi(sysctlstring); + pid_max_length = ceil(log10(pid_max + 1)); + } + } rc = snprintf(root, sizeof(root), @@ -528,16 +558,23 @@ char *semanage_conf_path(void) /**************** functions that create module store ***************/ -/* Check that the semanage store exists. If 'create' is non-zero then - * create the directories. Returns 0 if module store exists (either - * already or just created), -1 if does not exist or could not be - * read, or -2 if it could not create the store. */ +/* Check that the semanage store exists and that the read lock can be + * taken. If 'create' is non-zero then it creates the directories + * and the lock file. Returns 0 if the module store exists (either + * already or just created) and the read lock can be taken, -1 if it + * does not exist or it is not possible to read from it, or -2 if it + * could not create the store or it could not take the lock file. */ int semanage_create_store(semanage_handle_t * sh, int create) { struct stat sb; int mode_mask = R_OK | W_OK | X_OK; const char *path = semanage_files[SEMANAGE_ROOT]; int fd; + pid_t pid, lock_pid; + char *pid_string, *lock_pid_string; + size_t pid_length; + ssize_t pid_bytes; + int invalid_lock = 0; if (stat(path, &sb) == -1) { if (errno == ENOENT && create) { @@ -607,24 +644,81 @@ int semanage_create_store(semanage_handl return -1; } } + pid = getpid(); + pid_string = malloc(pid_max_length * sizeof(char)); + sprintf(pid_string, "%d", pid); + pid_length = strlen(pid_string); path = semanage_files[SEMANAGE_READ_LOCK]; if (stat(path, &sb) == -1) { if (errno == ENOENT && create) { if ((fd = creat(path, S_IRUSR | S_IWUSR)) == -1) { ERR(sh, "Could not create lock file at %s.", path); + free(pid_string); return -2; } + pid_bytes = write(fd, pid_string, pid_length); close(fd); + free(pid_string); + if (pid_bytes == (ssize_t) pid_length) + return 0; + else { + ERR(sh, "Could not create lock file at %s.", path); + return -2; + } } else { ERR(sh, "Could not read lock file at %s.", path); + free(pid_string); return -1; } } else { if (!S_ISREG(sb.st_mode) || access(path, R_OK | W_OK) == -1) { ERR(sh, "Could not access lock file at %s.", path); + free(pid_string); return -1; - } + } else { + fd = open(path, O_RDWR); + if (fd > 0) { + lock_pid_string = malloc(pid_max_length * sizeof(char)); + pid_bytes = read(fd, lock_pid_string, pid_max_length); + if (pid_bytes > 0) { + lock_pid = (pid_t) atoi(lock_pid_string); + if (lock_pid > pid_max) + invalid_lock = 1; + else if (kill(lock_pid, 0) != 0) + if (errno == ESRCH) + invalid_lock = 1; + + if (!invalid_lock) { + ERR(sh, "Could not create lock file at %s.", path); + close(fd); + free(pid_string); + free(lock_pid_string); + return -2; + } + } else + invalid_lock = 1; + + if (invalid_lock) { + pid_bytes = pwrite(fd, pid_string, pid_length, 0); + close(fd); + free(pid_string); + free(lock_pid_string); + if (pid_bytes == (ssize_t) pid_length) + return 0; + else { + ERR(sh, "Could not create lock file at %s.", path); + return -2; + } + } else { + ERR(sh, "Could not create lock file at %s.", path); + close(fd); + free(pid_string); + free(lock_pid_string); + return -2; + } + } + } } return 0; } @@ -1795,64 +1884,74 @@ int semanage_install_sandbox(semanage_ha static int semanage_get_lock(semanage_handle_t * sh, const char *lock_name, const char *lock_file) { + pid_t pid, lock_pid; + char *pid_string, *lock_pid_string; int fd; - struct timeval origtime, curtime; + size_t pid_length; + ssize_t pid_bytes; int got_lock = 0; + int overwritten_lock = 0; - if ((fd = open(lock_file, O_RDONLY)) == -1) { - if ((fd = - open(lock_file, O_RDWR | O_CREAT | O_TRUNC, - S_IRUSR | S_IWUSR)) == -1) { + pid = getpid(); + pid_string = malloc(pid_max_length * sizeof(char)); + sprintf(pid_string, "%d", pid); + pid_length = strlen(pid_string); + if ((fd = open(lock_file, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) == -1) { ERR(sh, "Could not open direct %s at %s.", lock_name, lock_file); + free(pid_string); return -1; + } else { + lock_pid_string = malloc(pid_max_length * sizeof(char)); + pid_bytes = pread(fd, lock_pid_string, pid_max_length, 0); + if (pid_bytes == 0) { + overwritten_lock = 1; + pid_bytes = write(fd, pid_string, pid_length); + if (pid_bytes == (ssize_t) pid_length) + got_lock = 1; + } else { + lock_pid = (pid_t) atoi(lock_pid_string); + if (lock_pid > pid_max) { + overwritten_lock = 1; + pid_bytes = pwrite(fd, pid_string, pid_length, 0); + if (pid_bytes == (ssize_t) pid_length) + got_lock = 1; + } else { + if (lock_pid == pid) + got_lock = 1; + else if (kill(lock_pid, 0) != 0) + if (errno == ESRCH) { + overwritten_lock = 1; + pid_bytes = pwrite(fd, pid_string, pid_length, 0); + if (pid_bytes == (ssize_t) pid_length) + got_lock = 1; + } + } } } - if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { - ERR(sh, "Could not set close-on-exec for %s at %s.", lock_name, - lock_file); + + if (!got_lock) { close(fd); + free(pid_string); + free(lock_pid_string); + if (overwritten_lock) + unlink(lock_file); + ERR(sh, "Could not get direct %s at %s.", lock_name, lock_file); return -1; } - if (sh->timeout == 0) { - /* return immediately */ - origtime.tv_sec = 0; - } else { - origtime.tv_sec = sh->timeout; - } - origtime.tv_usec = 0; - do { - curtime.tv_sec = 1; - curtime.tv_usec = 0; - if (flock(fd, LOCK_EX | LOCK_NB) == 0) { - got_lock = 1; - break; - } else if (errno != EAGAIN) { - ERR(sh, "Error obtaining direct %s at %s.", lock_name, - lock_file); - close(fd); - return -1; - } - if (origtime.tv_sec > 0 || sh->timeout == -1) { - if (select(0, NULL, NULL, NULL, &curtime) == -1) { - if (errno == EINTR) { - continue; - } - ERR(sh, - "Error while waiting to get direct %s at %s.", - lock_name, lock_file); - close(fd); - return -1; - } - origtime.tv_sec--; - } - } while (origtime.tv_sec > 0 || sh->timeout == -1); - if (!got_lock) { - ERR(sh, "Could not get direct %s at %s.", lock_name, lock_file); + if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { + ERR(sh, "Could not set close-on-exec for %s at %s.", lock_name, + lock_file); close(fd); + free(pid_string); + free(lock_pid_string); + unlink(lock_file); return -1; } + + free(pid_string); + free(lock_pid_string); return fd; } @@ -1901,29 +2000,27 @@ int semanage_get_active_lock(semanage_ha } } -/* Releases the transaction lock. Does nothing if there was not one already - * there. */ +/* Releases the transaction lock: the lock file is removed */ void semanage_release_trans_lock(semanage_handle_t * sh) { int errsv = errno; if (sh->u.direct.translock_file_fd >= 0) { - flock(sh->u.direct.translock_file_fd, LOCK_UN); close(sh->u.direct.translock_file_fd); sh->u.direct.translock_file_fd = -1; } + unlink(semanage_files[SEMANAGE_TRANS_LOCK]); errno = errsv; } -/* Releases the read lock. Does nothing if there was not one already - * there. */ +/* Releases the read lock: the lock file is removed */ void semanage_release_active_lock(semanage_handle_t * sh) { int errsv = errno; if (sh->u.direct.activelock_file_fd >= 0) { - flock(sh->u.direct.activelock_file_fd, LOCK_UN); close(sh->u.direct.activelock_file_fd); sh->u.direct.activelock_file_fd = -1; } + unlink(semanage_files[SEMANAGE_READ_LOCK]); errno = errsv; }