From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5484386F432; Sun, 17 May 2020 13:00:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5484386F432 From: "mark at klomp dot org" To: bzip2-devel@sourceware.org Subject: =?UTF-8?B?W0J1ZyBiemlwMi8yNTQ5Ml0gYnppcDIuYzogaWdub3JpbmcgcmV0?= =?UTF-8?B?dXJuIHZhbHVlIG9mIOKAmGZjaG93buKAmQ==?= Date: Sun, 17 May 2020 13:00:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: bzip2 X-Bugzilla-Component: bzip2 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution cc bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: bzip2-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bzip2-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2020 13:00:42 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25492 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID CC| |mark at klomp dot org Status|UNCONFIRMED |RESOLVED --- Comment #1 from Mark Wielaard --- I don't think this is a real bug. First we do "check" the result, by throwi= ng it away, that is what the (void) does. And my compiler doesn't show that warning, even with -Wunused-result. This is the whole function: static=20=20 void applySavedFileAttrToOutputFile ( IntNative fd ) { # if BZ_UNIX IntNative retVal; retVal =3D fchmod ( fd, fileMetaInfo.st_mode ); ERROR_IF_NOT_ZERO ( retVal ); (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); /* chown() will in many cases return with EPERM, which can be safely ignored. */ # endif } As you can see, the comment already explains why we don't care. What the function tried to do is set the attributes of the new output file = to the same attributes of the input file. So if your input file was owned by u= ser mark, it will try to set the output file to the same owner. If you aren't t= he user mark, but only had read permission to the input file, and you don't ha= ve permission to change the owner of a file, then the output file will just be owned by you. --=20 You are receiving this mail because: You are on the CC list for the bug.=