From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gPSeLcJifGAh4AAAgWs5BA (envelope-from ) for ; Sun, 18 Apr 2021 18:48:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +MFTKcJifGDeKAAA1q6Kng (envelope-from ) for ; Sun, 18 Apr 2021 16:48:02 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6D27519798 for ; Sun, 18 Apr 2021 18:48:02 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 534EC2686C; Sun, 18 Apr 2021 12:47:57 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 75C971F9D5 for ; Sun, 18 Apr 2021 12:47:55 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 299C81B00101; Sun, 18 Apr 2021 19:47:53 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1618764473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dhLCooeEkdTwiayJROlVW/DqITeCv3qz0l1a/7bVm6Y=; b=JBPxeoxppxQGuDFKfwRYw0TEh9u2HJbOrWIDRVtA3VK05/TEVYPfpTDhUhDGhgmgy0gEmz IYom0Pf885n1zl89QR4Px/bjW+tU1TT6QP94K3D+7N188ekE1fQUErhpjinGyT4PLOcPRS xsXvkeQvGLbtWhCjskyKG72NuCsaytv1P524rLkwV/RPy8UCjAQD7AQBBUGPNJyrnvu9Cs Z7SwfJWp5bC6QEsNin7jweiJZVJlPHjatNRBPRmj3N4/mddp/bxi7kAaHBRi2BBcAsOhcy g3qPU9q5iNFUrN1Pp41S6zJRHQz3tY8664CpIPz5tkU0/efEtfNqNPnDd/XVNg== From: Tomi Ollila To: David Bremner , =?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7Ru?= =?utf-8?B?Zw==?= Danh Subject: Re: [PATCH] compat: expose canonicalize_file_name to C++ In-Reply-To: References: <20210417001835.24251-1-congdanhqx@gmail.com> <87a6pxcdnk.fsf@tethera.net> <87zgxxasao.fsf@tethera.net> <87v98jbvy3.fsf@tethera.net> User-Agent: Notmuch/0.31.4+128~gc67b63a (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1618764473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dhLCooeEkdTwiayJROlVW/DqITeCv3qz0l1a/7bVm6Y=; b=aNuHKEanlRNlb7R4o7jOLmUW5lKGoa76CRszqAOZPnOru6tjy0cNDylI32PVVDUa0rrrmG +bNPM1XcM2/1KfGT3VhQzPX70LGD0pGzK2YAmVxDJPxPKz8Npmm/58Uo98M5XjC+g9bz44 9hUKliLNbtcP4IieMx3hruazMbLnLh2yhQBdUXYo/U+8adczkHCRQYbeQnTZC3esU9XwKP lHmNAQ94F7HrSyOie4PlJtX56mS9UPgwCl0hRivkcJkkk6e0W6RhvNBbXLbrynXqpsUN0i YE1XwOGc9thFhZaq+P4W9c/XojbUeuv25WPcda3wv+jdtaYvZo2VMrY3yZRl5w== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1618764473; a=rsa-sha256; cv=none; b=Y/wh1TnjknMf7yeHURx+z1ahKdW8qGAqY62LW4LyCTUXMgrLdBoUoLFLKO5jiDs/Py3uTb hlp9TKYk/9c3yKhk9qY16hJ4nWE3404QNLl6Q4ALxm4tlI9lX2VVMbUNWPl/0Qek4nT3oM HeiTEB8gro1sD/Zb+GWIU84HWd2SUlx+5b3kyJbTCDztKkM8ep+DTBIpQF1nD9sh4qsXNv SHy9Bj/4lLtKVut6sxqgv+pjCvEbYrMHoCZkCxx4Cq5LkR50q7EYKQw3B4LztnDRb961T0 BCd3sJtZmpLo8LID8qTtyGtHaWsCtftde15kKU0QXxAd7ajyu4NVZUHr4dELPA== Message-ID-Hash: FAEK4XNUDFGPHAGEHUGBIQBTVMMY2CWD X-Message-ID-Hash: FAEK4XNUDFGPHAGEHUGBIQBTVMMY2CWD X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: notmuch@notmuchmail.org X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618764482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=PKRWRmxW75yqV2AIlI0TO0ZqkjoCMKiGncQnLVntYXU=; b=F2OSKCS8Vs4AtqTcqO/PEA2PgAlhEjjyJVk2Pg6SlsN2/jXwTEG1K6lMkgVR2qN9Xskd73 9BRnKEbp4meQ49fprXMm9A9Ausa0ATM7nDbDrLzgBC3gNtqnJE3zyYh7bkfa9wLU0z4piy 9fUio17R+m19SlziPxaMu8A3H3ke0lib8MxQs3Pem2KV9PMov3GbAhNsL23sRM7hLn7hga 3njL35qJACbWaUYweHv5JYnQUBLJoVNqPqq0aamS7IvoubNXI9Y+D+brI2Py44Yo6YZ5X/ D4s9mkCfQXTdkjoqiMbiy1oOd+QhL4y+s5YzjAei1VDvlIP5fjUK4r9g9x4YZA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1618764482; a=rsa-sha256; cv=fail; b=fXmDeA2y8rEys91GbXMCISmWOQtOBGpA/zSqjsZW1/UgefG3XN9OjohW+oylPm7cjijqCp BHfr0nGbjdTFaJ5l+6Yz/zcMns6ogtBHYP551ZSDP/qXUN9MI5mGiSx1l0UQqlmzIHKo2H AOJ6lOgSAbGsBnzn0bR3hu3X6fVCmkQ2P6qtGjmje5vH40ScqQybdnOFEhEm5XqrrnInW5 ILeV/j+EzLKMDDkAcnIneSXcDMvE1m5bG2TGAqhNTSiJ3xLRZH/wFsJILsSgeN0viRbm5X 2+pMlI8U4BDGbf7On4xGt/P5S3/eDqTi+Tyz2B+fkjcLjEIjk/lHcZqGzWlMTg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=JBPxeoxp; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.94 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=JBPxeoxp; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 6D27519798 X-Spam-Score: 0.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: 54fZQQO+uBiQ On Sun, Apr 18 2021, Tomi Ollila wrote: > > not perl, but python3 -c 'import socket; print(socket.getfqdn())' notmuch_passwd_sanitize() { python3 -c ' import os, sys, pwd, socket pw = pwd.getpwuid(os.getuid()) user = pw.pw_name name = pw.pw_gecos.partition(",")[0] fqdn = socket.getfqdn() for l in sys.stdin: l = l.replace(user, "USERNAME").replace(fqdn, "FQDN").replace(name, "USER_FULL_NAME") sys.stdout.write(l) ' } could work, could not remember whether it was PYTHON or NOTMUCH_PYTHON, and tested only manually on command line... > > Tomi Tomi