From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 0c17482f for ; Wed, 19 Feb 2020 02:33:15 +0000 (UTC) Received: (qmail 28355 invoked by uid 550); 19 Feb 2020 02:33:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28317 invoked from network); 19 Feb 2020 02:33:13 -0000 From: Zhang Tianci To: CC: , Date: Wed, 19 Feb 2020 10:32:22 +0800 Message-ID: <20200219023222.35095-1-zhangtianci1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.113.189.241] X-CFilter-Loop: Reflected Subject: [musl] [PATCH] stat: Fix chmod chmod misses `flag` argument when calling the syscall fchmodat. Although Linux does not use `flag` in fchmodat, but in other system, fchmodat will get a random value and it will cause flag check error. Signed-off-by: Zhang Tianci --- src/stat/chmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stat/chmod.c b/src/stat/chmod.c index d4f53c5..e99a146 100644 --- a/src/stat/chmod.c +++ b/src/stat/chmod.c @@ -7,6 +7,6 @@ int chmod(const char *path, mode_t mode) #ifdef SYS_chmod return syscall(SYS_chmod, path, mode); #else - return syscall(SYS_fchmodat, AT_FDCWD, path, mode); + return syscall(SYS_fchmodat, AT_FDCWD, path, mode, 0); #endif } -- 2.17.1