Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp69758ybh; Mon, 20 Jul 2020 10:32:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDGBeNYJPJoQO+JxiwS1GZSkSl7V3lc702fXAsaSJDPXWcRJCw85ID/llKVYImKpgRLTJq X-Received: by 2002:a17:906:9716:: with SMTP id k22mr21825969ejx.200.1595266361567; Mon, 20 Jul 2020 10:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595266361; cv=none; d=google.com; s=arc-20160816; b=iFPioL3ocuPSsp9/HI7sJ8TpiEzWABPa51ja0t8Z/ZQFWttaQTBuOppd62ljSd0phY cr2FLpn9t9sqRm+nFyTGQjEW3w/1CS8qy951qgxh+fzW5zLIaEJbGRydv+jJXWud3T0R tBHy6M2+cyL8QOjfyuiJuBX+Iy7i2hhg367obDcxaHyjrQDtsm+I8cG5N3YB/hfHRuV9 Vxmai5LM+WA/HTFyQcXRjjNYNX6wOdN0+FFwQZXDNiZKpbFKPo13ygyDeVsi4kT6CHxn mD0hHTp0Tqw1w/3Sb0aqXJwxiMCLQIkEr2mmf+RZ3NYEosTnV+5re+a0Km+ak8AGRiuF YjRQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=G89lwT+FtkR2FETWIYkZT5O9jHSgPOzT5mGuCVXdcSQ=; b=fdeoiRpnJjtlsUDiHLza57rm0KonmIumMrUDLBQN2zVovfC3wCLL6b3FV7owiCwpVi WOrRjRVq4SoTrjuS7F3DNgBPRyMGLaMj9rg65h5aGOZna8bFjag9TBfwj0oGCz1OtGuk +EFRuZ8zsE/6Ak1pDrgNjOsbOBZnAZFm4QJ8So04FTgk1ZFBxw/i+l8BKBStFRv+4vkx 4jrx6nXtAX4kwFDp55pu0N8l3F5a5L4PFEb79CYxJWGIfm81iQhSizdxHFp8yxU2G1+j IGlVCuvRdt465Y5RjszpTmZym8m9GJT/6WuGODr4ptqFjMconHxSBo44zHdLZG91Fv2v lG/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="atLqYd//"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si10807697ejb.557.2020.07.20.10.32.08; Mon, 20 Jul 2020 10:32:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="atLqYd//"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728979AbgGTRcF (ORCPT + 99 others); Mon, 20 Jul 2020 13:32:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:50126 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728939AbgGTRcF (ORCPT ); Mon, 20 Jul 2020 13:32:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595266323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G89lwT+FtkR2FETWIYkZT5O9jHSgPOzT5mGuCVXdcSQ=; b=atLqYd//Ut/zf4RKtf7RK00hJuGOQHR6AWstqEJWLEhyFINQ1pmhBA/cg7S4HeUz8i/0NI AtWKqgrQxvVq7wtAW1nyqOXYYfPrjPGqK6Jf1kxz2M8yZ/2CqleRueGE1QliW95KAuZVEe VMTCTtfQTP+8OUovBns22KF1hNeDfdM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-504-gsZX07gRMy-QygHPUfzW4Q-1; Mon, 20 Jul 2020 13:31:52 -0400 X-MC-Unique: gsZX07gRMy-QygHPUfzW4Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFDDD19200C0; Mon, 20 Jul 2020 17:31:51 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-113-147.phx2.redhat.com [10.3.113.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D7027852C; Mon, 20 Jul 2020 17:31:51 +0000 (UTC) Subject: Re: [PATCH 09/11] nfsidmap: Add support to cleanup resources on exit To: Doug Nazar , linux-nfs@vger.kernel.org References: <20200718092421.31691-1-nazard@nazar.ca> <20200718092421.31691-10-nazard@nazar.ca> <84277cb9-03da-3065-1848-f8c1e2bee167@RedHat.com> <568e0535-e20c-80a9-a0c7-61b3656f997f@nazar.ca> From: Steve Dickson Message-ID: <9481df67-109d-ede1-27d4-53cb66fbb528@RedHat.com> Date: Mon, 20 Jul 2020 13:31:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <568e0535-e20c-80a9-a0c7-61b3656f997f@nazar.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 7/20/20 11:58 AM, Doug Nazar wrote: > On 2020-07-20 11:49, Steve Dickson wrote: >> >>> +__attribute__((destructor)) >>> +static int nss_plugin_term(void) >>> +{ >>> +    free_local_realms(); >>> +    conf_cleanup(); >>> +    return 0; >>> +} >>> + >> Just wondering... How is nss_plugin_term() called/used? > > Automatically during dlclose(), see the 'Initialization and finalization functions' section of the man page. I'd originally thought to extend trans_func but didn't see an easy way to extend the api (no size or version field) without breaking any possible out of tree plugins (do they exist?). Interesting... I think I'll add a comment explaining it... No..they do not exist.. The way you are going is fine... Less churn is good ;-) steved.