From owner-freebsd-current@freebsd.org Sun Jul 9 08:03:04 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69472DAD6D8 for ; Sun, 9 Jul 2017 08:03:04 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-wr0-x232.google.com (mail-wr0-x232.google.com [IPv6:2a00:1450:400c:c0c::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00E637CC31 for ; Sun, 9 Jul 2017 08:03:04 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-wr0-x232.google.com with SMTP id 77so98705101wrb.1 for ; Sun, 09 Jul 2017 01:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=NwG+M/GxnqVIj+TtY8QcgL2UTddPvHitX5Zm/YX7dJE=; b=Fo1GJ5nzYLN1jsywhMlRmpAQPQGVmxs1dz2FBdhpgF7J3KCxa4ncT6ZnoyBJcTtB9/ Yt8BAvEjiRi3E1dNe3Q984lGWQ0nzIekIeqfzXnOhlWyyL9A3GspYfOWrel29/YI5Gg1 yT1S2e2+aO+mHykVsAjiXA4I6VeaU/UrWGAJvuCUpw/D/zUal5mQGiUbyRnZIcm8ueUH N4nV5pE9uIsseotunFbKhGmuk+vEaPZuIxeKMSRKZY+ojP0WbltlivWyj5kZSMC0Uvag dOzCBXb4uVLX93sdT3TadSGwj3W2K9h+afC0ShSumvJZwKO1nbz0+2MKJx9D80enwzTG DgLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NwG+M/GxnqVIj+TtY8QcgL2UTddPvHitX5Zm/YX7dJE=; b=czfaqQlhDXeXPbCxvhSMMxaXprHzFUA/DmTQHFeuBzNqrOvsvIbr7Kc8/upm53an/4 hjS4c8f3w3OW+2jvqD/qwjsun/AIS39Tz+V0O36ur28KYHMDT1OADU/7dVAAYoDP6QA2 oWiuqCUV4HcmZT8twnXoCiHOUka9zrulID3cA9dvXA+9zSf/Yp5LXh7h5quiri5GvNn2 FsJMgizgC5Yf0sxOkndV7GDNTu2CwXO8HtGIFLkxmCKNqNki8TpoaWDmKuCKMyuk2Y40 4nIT2lV/D8435CJ2pkhUmyNl6jL+KgRtPDp1ZqOlcSisXd2ROmm/YIsJwS8xXmgLSQ9M E0aA== X-Gm-Message-State: AIVw112LgRjIpj8qdACSxa4JYIIKM+fZE4mCae98/VqLqivKHKw5y/Va tRb+ECh1R4oaASc5BN1iJGNpZeDNag== X-Received: by 10.223.177.213 with SMTP id r21mr4423721wra.119.1499587382091; Sun, 09 Jul 2017 01:03:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.154.193 with HTTP; Sun, 9 Jul 2017 01:03:01 -0700 (PDT) From: Johannes Lundberg Date: Sun, 9 Jul 2017 10:03:01 +0200 Message-ID: Subject: Getting PID of socket client To: freebsd-current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jul 2017 08:03:04 -0000 Hi Without altering the client code (i.e. adding sendmsg(credentials)), is there anyway of getting the client PID (or path to binary) using the file descriptor returned by accept() on the server side? Similar to Linux's getsockopt with SO_PEERCRED option. Thanks!