From patchwork Fri May 2 19:15:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 29580 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2D988203F3 for ; Fri, 2 May 2014 19:21:22 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oz11sf17295015veb.5 for ; Fri, 02 May 2014 12:21:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=RLpgMznuCwIOzwkCzfpfZ4qxm1Dt6AeNaHQ9nYmQ9wI=; b=UD5sy49HaCZ/AIfPU9MvKW3NbD4dRPnzChGW03BTZfGXln0ax4Ded6/ekkHiiygm63 l8zFJizh09xfuSB3OekG3wIqs6Aw6pb1vlFfysB8YxHXXyKjCvAbmy6L8uEtmwlT1VBD u7nQWqN928MpkqXj7h7InGW4cIk+jW5PHHF7AHSrhAplJEPfy0evrs+y7NJ2wFf7NUoC iROpR22kruaIB0NynJiudOYb/NDRYpDl1LTuual+l39FtN/l6fO5hp4Mq4a2vA1/E709 Va6c9JGj4niRErU4ybq8oYLIt00sRsyuvrQD1O8AfB2vNTiZTjIBJkak12TUAHRezIgP /BtA== X-Gm-Message-State: ALoCoQnPAsxI6ibZeJ78v4/nlLmHMddbBfXC6Hp9aTxA9xJxl8mmEhS39PfxRKbPHHFubsi1fKVr X-Received: by 10.58.111.202 with SMTP id ik10mr9531899veb.4.1399058481908; Fri, 02 May 2014 12:21:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.19 with SMTP id 19ls312371qgc.69.gmail; Fri, 02 May 2014 12:21:21 -0700 (PDT) X-Received: by 10.52.1.200 with SMTP id 8mr765773vdo.76.1399058481752; Fri, 02 May 2014 12:21:21 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id sq9si6903595vdc.179.2014.05.02.12.21.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 12:21:21 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so5908212veb.13 for ; Fri, 02 May 2014 12:21:21 -0700 (PDT) X-Received: by 10.52.38.5 with SMTP id c5mr29026vdk.85.1399058481698; Fri, 02 May 2014 12:21:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp126032vcb; Fri, 2 May 2014 12:21:21 -0700 (PDT) X-Received: by 10.224.29.148 with SMTP id q20mr24936406qac.41.1399058481125; Fri, 02 May 2014 12:21:21 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 4si1006769qcl.68.2014.05.02.12.21.21 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 12:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:45989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgJ1M-0007P6-KD for patch@linaro.org; Fri, 02 May 2014 15:21:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIwE-00082D-3J for qemu-devel@nongnu.org; Fri, 02 May 2014 15:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgIw4-00008u-MD for qemu-devel@nongnu.org; Fri, 02 May 2014 15:16:02 -0400 Received: from afflict.kos.to ([92.243.29.197]:48064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgIw4-00005h-CU for qemu-devel@nongnu.org; Fri, 02 May 2014 15:15:52 -0400 Received: from localhost.localdomain (afflict [92.243.29.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id B8D63264CA; Fri, 2 May 2014 21:15:50 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 2 May 2014 22:15:39 +0300 Message-Id: <4bc2975698773afdca2f79ebcff9f3b588f646fc.1399057853.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: Huw Davies , peter.maydell@linaro.org Subject: [Qemu-devel] [PULL 04/14] linux-user: Add support for SCM_CREDENTIALS. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Huw Davies Signed-off-by: Huw Davies Signed-off-by: Riku Voipio --- linux-user/syscall.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 52bd000..27073b1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1269,6 +1269,17 @@ static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh, target_tv->tv_usec = tswapal(tv->tv_usec); break; } + case SCM_CREDENTIALS: + { + struct ucred *cred = (struct ucred *)data; + struct target_ucred *target_cred = + (struct target_ucred *)target_data; + + __put_user(cred->pid, &target_cred->pid); + __put_user(cred->uid, &target_cred->uid); + __put_user(cred->gid, &target_cred->gid); + break; + } default: goto unimplemented; }