From patchwork Wed Oct 17 13:53:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Lyakas X-Patchwork-Id: 1606091 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 456013FD4F for ; Wed, 17 Oct 2012 13:54:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757049Ab2JQNyA (ORCPT ); Wed, 17 Oct 2012 09:54:00 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:51168 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757018Ab2JQNx7 (ORCPT ); Wed, 17 Oct 2012 09:53:59 -0400 Received: by mail-lb0-f174.google.com with SMTP id n3so5097142lbo.19 for ; Wed, 17 Oct 2012 06:53:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=h3hIzYsVnmE6dcRpJhu77+bdsRPxky4mMZsnX89EpYY=; b=K+dfAEXYj45Cu0YlSCowxz4OGD4ewuJigH20IuGvby3xILPCIU3OWjaoWI/tv8zbXx 5bQCEmAALm1rKXKdfet3O9fg6dIbWPvVS2YV5TsrSI/arUpvWVnrz0/hi87eKxsR92bK SWT8xqKk5/v8rRoL+1eaximFZlEDpauQt0g1aUI88y/Kc/FncvBAOPWDjul7hMsjzKgX t0A7uWBSg82ug748lzsBPb5FAGubfeQN2i8XHvqg9fRO3BwZFFIzDMK8BHbBGuqSUxEH 0Oa4d9ERRRl+wKmkWAATsbo/bgbQn/epniQfTm6/zT6ts9rYLnNldh66Hc3apfneGuuC hVPQ== MIME-Version: 1.0 Received: by 10.152.103.18 with SMTP id fs18mr15826919lab.32.1350482038292; Wed, 17 Oct 2012 06:53:58 -0700 (PDT) Received: by 10.112.127.232 with HTTP; Wed, 17 Oct 2012 06:53:58 -0700 (PDT) Date: Wed, 17 Oct 2012 15:53:58 +0200 Message-ID: Subject: [PATCH] btrfs-progs: Receive: preserve ownership for symlinks, by using 'lchown' From: Alex Lyakas To: linux-btrfs , chris.mason@fusionio.com, Jan Schmidt Cc: Arne Jansen X-Gm-Message-State: ALoCoQkLf78/DmLFZNQxoYE1u0Yb242/spJnwWsitQr7Q2QhYazngtkq/MGR0tfGvhJEnK2P8DuW Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Alex Lyakas fprintf(stderr, "ERROR: chown %s failed. %s\n", --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/cmds-receive.c b/cmds-receive.c index 6b7cf12..a6a6a5b 100644 --- a/cmds-receive.c +++ b/cmds-receive.c @@ -731,7 +731,7 @@ static int process_chown(const char *path, u64 uid, u64 gid, void *user) fprintf(stderr, "chown %s - uid=%llu, gid=%llu\n", path, uid, gid); - ret = chown(full_path, uid, gid); + ret = lchown(full_path, uid, gid); if (ret < 0) { ret = -errno;