From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C47F5C433B4 for ; Thu, 1 Apr 2021 12:01:33 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FB4F60FEF for ; Thu, 1 Apr 2021 12:01:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FB4F60FEF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FB1xR6rTJz3bpL for ; Thu, 1 Apr 2021 23:01:31 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=uk9Uy1z8; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=xiang@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=uk9Uy1z8; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FB1xP1MVhz3bw0 for ; Thu, 1 Apr 2021 23:01:29 +1100 (AEDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id 0228A60FEF; Thu, 1 Apr 2021 12:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617278486; bh=2Y42ZCyZYrzYEokzxl+Jllj47PdIdkfZ0mo8f5NcGkk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uk9Uy1z8FnKyE1UVJ/TIDaU7r26i0pSKkqlNYguo4SMKNAqsVchnoVVYpi7SkDsaq xZCRHeszI0fXAVjKqcxmKTWYvXz9oFTLjV9ph5dTpZ2qzTnvmcfmwVfYjVhVz8lR16 yXxnUk5UV7tbq/UnNjMO0hp/kjr7PavYr1rbYKTGUIzxmaMLsToTDDrROtBu23F1+9 uJaj/GUd/FD2yqNRU9fS0W5K/B3O9w8zCSxfEMd7wzgd+B2+XL5RYwMNQIFLtzlSha 8sPcXjI1Zl6fuVhzG5QAMf8k/bfQYwt9uTaUMjLSbbJru3Fq0gy0Vmd4iGyIyvIuXh c06frcv3ghOHw== Date: Thu, 1 Apr 2021 20:01:03 +0800 From: Gao Xiang To: Hu Weiwen Subject: Re: [PATCH v2] erofs-utils: add cmd argument to override uid/gid Message-ID: <20210401120102.GA30040@hsiangkao-HP-ZHAN-66-Pro-G1> References: <20210401060132.GA3827683@xiangao.remote.csb> <20210401113610.49094-1-sehuww@mail.scut.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210401113610.49094-1-sehuww@mail.scut.edu.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-erofs@lists.ozlabs.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On Thu, Apr 01, 2021 at 07:36:10PM +0800, Hu Weiwen wrote: > Also added '--all-root' option to set uid and gid to root conveniently. > > This function can be useful if we want to pack some data owned by user with > large uid, but we want to use compact inode. > > This interface mimics that of 'mksquashfs'. > > Signed-off-by: Hu Weiwen Yey! I've applied with the following modification, diff --git a/include/erofs/config.h b/include/erofs/config.h index e6eaef66b91c..15390f4ca9c8 100644 --- a/include/erofs/config.h +++ b/include/erofs/config.h @@ -54,8 +54,7 @@ struct erofs_configure { /* < 0, xattr disabled and INT_MAX, always use inline xattrs */ int c_inline_xattr_tolerance; u64 c_unix_timestamp; - u32 c_uid; - u32 c_gid; + u32 c_uid, c_gid; #ifdef WITH_ANDROID char *mount_point; char *target_out_path; diff --git a/mkfs/main.c b/mkfs/main.c index 72b7f17e1c66..d8823b539194 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -77,8 +77,8 @@ static void usage(void) #ifdef HAVE_LIBSELINUX " --file-contexts=X specify a file contexts file to setup selinux labels\n" #endif - " --force-uid=UID set all file uids to UID\n" - " --force-gid=GID set all file gids to GID\n" + " --force-uid=# set all file uids to # (# = UID)\n" + " --force-gid=# set all file gids to # (# = GID)\n" " --all-root make all files owned by root\n" " --help display this help and exit\n" #ifdef WITH_ANDROID Otherwise looks good to me, Reviewed-by: Gao Xiang Thanks, Gao Xiang