Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8939943ybi; Fri, 7 Jun 2019 00:15:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyn2d5w590y+J0+kaMWsyLQYjoqysWlXT9l5EIEQb0xpC5SiN8VpC+bOEJjVrlLLKsKV2gq X-Received: by 2002:a65:4c4c:: with SMTP id l12mr1402781pgr.404.1559891730341; Fri, 07 Jun 2019 00:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559891730; cv=none; d=google.com; s=arc-20160816; b=xu5CvlmNdy/QdyLH1E1+dPdk0lP+qE6/5njj8ajmqAkIkdGqsjE5ojIrtUtwZLA0kA oRHAtNiCmMkTVdifnXU9T94dyihT804VwRVn4y15tizCpG21Tu6r0m13EOSxo/4OdFON 9bpr24VkDvM9UIMwc1qIOUnJUTHvpQ+2FvsGcHJWkUX4znqYD8ukEPAcCRajXR6SB6cq 5QIDH7sI2KoLCQRsOoy94gpBM1ZPlHOyq5fA8V7zGEWwpfUd79EQ9Mc1h/UY2qlva7ii 7Kgva5QHL2eS/Fr3G7WhTCw1gLqtHrt8dqNZHtcf4x0UuwQD3cw/35Xdfb/F0538R+kd kZXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=sA1Z4LjZa3BbwiuIv0GJ6j076NZfffVD9WdKDrcKVyw=; b=LvmryemyraNwdH0kFUOhHnD2xBag11DPpwSsCOrgRGava4w3aXtZ4/mVq9oAxyKd3d wOzCWBAWwyqL1oHLZKrR8BuENyw93r3+isRSiMKpsmr6LGmeewfi6ZsI+HbhnMt7gYUc DGyEmsDYtK8WewpJrPqU3YW6/3mdRZp1g63pBXdVzWQzpppxpzVwYqqM8X+h6EjaeqHW /4aRHONKM9UNujU6oHtPEUZ+ink49pmHz4P15j/X+Iu/mcqgzDogSLlGxnL4ehaw6fgU 6nbbNq4HpEipsIndtAekSmyP8hORJiW2J59JmXzoxDJDo6chIWyX8FhieQIquQ6uvpkt dDNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a37si1078882pgm.574.2019.06.07.00.15.15; Fri, 07 Jun 2019 00:15:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726825AbfFGGyT (ORCPT + 99 others); Fri, 7 Jun 2019 02:54:19 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:51863 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbfFGGyT (ORCPT ); Fri, 7 Jun 2019 02:54:19 -0400 X-Originating-IP: 83.155.44.161 Received: from localhost.localdomain (mon69-7-83-155-44-161.fbx.proxad.net [83.155.44.161]) (Authenticated sender: hadess@hadess.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 1DE3BC0011 for ; Fri, 7 Jun 2019 06:54:12 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Subject: [PATCH 1/2] sixaxis: Fix another problem with already setup devices Date: Fri, 7 Jun 2019 08:54:10 +0200 Message-Id: <20190607065411.28502-1-hadess@hadess.net> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org If the device went through any kind of pairing once, it might have been set as trusted. Make sure to set the device as untrusted before starting the cable pairing authorization so that we don't exit early from process_auth_queue() (which considers trusted devices to be paired). --- plugins/sixaxis.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c index fed68d2d8..12638829b 100644 --- a/plugins/sixaxis.c +++ b/plugins/sixaxis.c @@ -365,6 +365,7 @@ static bool setup_device(int fd, const char *sysfs_path, btd_device_device_set_name(device, cp->name); btd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version); + btd_device_set_trusted(device, false); btd_device_set_temporary(device, true); closure = g_new0(struct authentication_closure, 1); -- 2.21.0