From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx08-001d1705.pphosted.com (mx08-001d1705.pphosted.com [185.183.30.70]) by sourceware.org (Postfix) with ESMTPS id 471273858C41; Thu, 13 Jul 2023 08:06:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 471273858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sony.com Received: from pps.filterd (m0209320.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36D68hUd021745; Thu, 13 Jul 2023 08:06:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=S1; bh=yyl1X3SDks7xUEf3d8ll4loxqjLU0WXA23tvnttz83s=; b=Qyz5Krk/gGlPV0qGUuKAhYix6IXb8Vsm+6bPpVuJ4ccmoGx5mT+bKVape2S6tqs4o+hC MFO9vygg6g4QplhtVnGnYwIvxCOKJciUs7M9hz303GE7uFJUJvH/CZOVkbOTvIhEatkP 4Sqez2WUfQD0uoDJurIqdzGTnAfLx432NCQtfXvPjL8vSdO1pgQEOxrPDh5S+177rjPg ts/e/3Rhy0ghAAv/MXKpENKkZ4lqA2UqG7EVyWL3kcZt7+oUyZQORI9Iu6a2HF8Mmh3L ZfvjNDbdoVyIniVmmuI8W4R9RL6Lhc3BVylYx/I0P0LAr9Huu8znHsXRuOWZhd2/jjG8 8w== Received: from jpn01-tyc-obe.outbound.protection.outlook.com (mail-tycjpn01lp2171.outbound.protection.outlook.com [104.47.23.171]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 3rt6fjrcrj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Jul 2023 08:06:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JQ/DA65N4H7hk92lTtONIMA2f+PD5pLvFHf63pPO4c6nE5b1Tv0uvwfjYd57MjcAuCNW25vZ3qWGbESWKPdcM86S0AuZfiU7Zvit0glOJp9El8ejzlphk+svGfy5B5Zfla2e8CKli9+UYhLxneljyaV7OaQo8SYSmNr4kYA7J2+Fw8Lx/LZvi1o+coP/S+EXRc8p08C5IK5RUNcpp+G0JuJI64KKfKanDYxnR/7wnDVkpb6RUA/Va9WE2Fuhc144ONGlw6991Vz02VdTynRR5SRseiVuIca039KQxaUGTqO7guxjBUhI1zPu3+7WTFMSq3LGZGQM3M6qZSfPjZY5Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RgYdl4A7TrsCiBYXMHCtMY0M1ukLydiw9+Q7NWEZnKg=; b=Gz5UxK7Hl86alrS9wD/dWDxLQ0zinlAqphZwekU3t2s+U0rW3gJLoyScuXARwN6kEy5C9mLDSZrUgJwHBFXix1YG+u08AAVdc/m24DWehwibKoIq1bj4zH33C5gQ3aDXRcD+6jHBCn0F/9fc2VlOUEkVzBgCPM/y5bgHFiM+308k83dCeothHzU2EM8gyyqj1eVI8kSiw5i6SSz5U0sCDEWTdWq2rL1aCVxJwcwlnyO4N59q/dTEgNx2FKX79TOVsyGVNPrPar9NPLqQlp2RU4O7BMsdzt7lJeZZh2va8XV80gXp8l1RTWPCf1QIzUlUG3qivyYGb0MgME5uI7Y/1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sony.com; dmarc=pass action=none header.from=sony.com; dkim=pass header.d=sony.com; arc=none Received: from TYCPR01MB6963.jpnprd01.prod.outlook.com (2603:1096:400:ba::10) by TYYPR01MB8118.jpnprd01.prod.outlook.com (2603:1096:400:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Thu, 13 Jul 2023 08:06:11 +0000 Received: from TYCPR01MB6963.jpnprd01.prod.outlook.com ([fe80::d67e:f79d:67b1:f9b3]) by TYCPR01MB6963.jpnprd01.prod.outlook.com ([fe80::d67e:f79d:67b1:f9b3%4]) with mapi id 15.20.6588.024; Thu, 13 Jul 2023 08:06:11 +0000 From: "Hiroaki.Fuse@sony.com" To: Florian Weimer , "libc-alpha@sourceware.org" CC: "libc-stable@sourceware.org" Subject: RE: [PATCH] nscd: Move declarations used in the library out of Thread-Topic: [PATCH] nscd: Move declarations used in the library out of Thread-Index: AQHZrawOQI8tEW7HgkSDiuh5fGDVCq+3ZFdw Date: Thu, 13 Jul 2023 08:06:11 +0000 Message-ID: References: <87ilb1yxkn.fsf@oldenburg.str.redhat.com> In-Reply-To: <87ilb1yxkn.fsf@oldenburg.str.redhat.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TYCPR01MB6963:EE_|TYYPR01MB8118:EE_ x-ms-office365-filtering-correlation-id: ad106852-efe7-47ed-240d-08db8378056a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vFHrZQZhtTe3UvPKu2j0Orhv8c1Eg6UWuAtOsvt7hNuRubwB06UwGZq9Og6TlmZ/RO4KnS6KWis4HVt9aQXAszHtw6UEbb+gwHHs+drYAH+R99Jldd/IyadD7J0JiZT3R/7Zum1oy7E0uwLtTcFmGgojNaSRI53ylkyNCrtKfafmePJxzWad2nz/6B0pNMMfNiI8FZwImjzgN5RahjS5t2g7vUHXigo/gx84sk+SAQR8RHpOjQsTPqPQf48s+3nFg9J3sFWV5ZfO509qJe3bm6otsBn7LJQWNNpdU3V8cq9pLsjWON+hLhbh2M5GPvpQ5u9e9FElLmGlWqTUkRptHsTHOg4BoSX5uJVNQtVNzaFZCdCaznNcR72cR+VOtxuBuYxDk6tdOPRo+DYXjuBbnRfANKfLCLBZb1kMQEcnPwU8+hMjqLafX293fVa9y1XAxU9u8m1Idk4EjxImg0sGZ4MB8GcfNSmMYBLrZgLG25zPVnsQsE488WzIhbT2XQSIAbagJr2xwaKmMNRw0WnhryJUIlufJStD2jK8jwzadGlILV+705MVSMdtSVuyjOiRDqX2sBQUqMSumzomzuGx2bINWnJX3dKlk3vBjpKY3whuDucYxSf+jY5eZfiSMtrDmnB0gQv8BNlhnFqCRgAbA8wIUDl5xFSW/E/caUVWf6o= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB6963.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(366004)(39860400002)(396003)(346002)(136003)(451199021)(83380400001)(30864003)(2906002)(38070700005)(86362001)(33656002)(82960400001)(38100700002)(122000001)(55016003)(41300700001)(4326008)(316002)(7696005)(5660300002)(8676002)(8936002)(478600001)(76116006)(71200400001)(66556008)(66446008)(66476007)(66946007)(64756008)(110136005)(186003)(53546011)(9686003)(52536014)(6506007)(2004002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?e3cCzkto3eZJ3TG6VdKGwmn3VhTIpKmejWQ/gh6JBE1aLY6gr8xghzjBxveG?= =?us-ascii?Q?HCthHJrzzSVzhCMSAlCG1N0g6Kw8RNUDrrV4UrLaXDSzHm84hva1lTfdARAw?= =?us-ascii?Q?LOM/VAd/0EEKfr+N4lc2tzhRpQ4I2U1qWYaOwWHNksTBFw9FGPHKeCA05LIv?= =?us-ascii?Q?vR8vpCbkBVmsOuzBG8tqkGYhpDcDLajgfktXBCuedcBj9wsbRqXx7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HXv2eLtMKKvnYOn/oKqjuSylmWbwaohBakbMEdXHhfP33dvfunGF/PkNdKvHdGIjLebN28ck27jhNaT+czc+DUzvpqdpTY+APojHP6EySvUoy+IrKX1S7BAOB+M1v3W6E8HrvDpNpnT8fcaabFMSCLwbioQlxiRnKOf1MkOlhFvZw+343MBLlF1mKGssWzpQv/VMVCzGzxg6lApOOit6JI2gsIxEhfwBdhQl2a8yWa8kkoDfkgbGfZ2OUBvry4tWnpB/S0/gYjZEzzyg0gSz4g2oxyf8IHNj+WfqhCKyNfGA5dBJiWDr42s9sLc+V9yKH8v1Vo06+DrFBbwf/19qqOiBIw1LGPf+yijyqLv1C1IPf5jtJ+VYSAggMVNMJduzNEz0lESeohW7yF+tBnUfARKq+1B00Dlykog/Pf4sofF3Fqow81NxM99DDRcr1qxMaNP38n3Fw5Vu+wL8PbNnujkfMaD7K2PRoQZF+8JxAXOVe9P336aIsGRoPS+UPF6 X-OriginatorOrg: sony.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB6963.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad106852-efe7-47ed-240d-08db8378056a X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2023 08:06:11.2809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 66c65d8a-9158-4521-a2d8-664963db48e4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qn+VIaPVTc3ZcPRGnnAO2KoJaqf8NzRNK0IG1mF9lLK8jxHYyo+eE3O2z9O1dK1OL5uKozRaHzB8EmT3KMa0TA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB8118 X-Proofpoint-ORIG-GUID: Lnicam71YFwuXOmsGYY-uRoRzstiSjOf X-Proofpoint-GUID: Lnicam71YFwuXOmsGYY-uRoRzstiSjOf Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 4 URL's were un-rewritten MIME-Version: 1.0 X-Sony-Outbound-GUID: Lnicam71YFwuXOmsGYY-uRoRzstiSjOf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-13_04,2023-07-11_01,2023-05-22_02 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Dear Florian Weimer, Thank you for your quick update. My understanding is that we can conclude the license of glibc as LGPLv2.1 after applying your patch. Is it correct? I hope community's consensus to apply this fix to the mainline. Regards, > -----Original Message----- > From: Florian Weimer > Sent: Monday, July 3, 2023 9:44 PM > To: libc-alpha@sourceware.org > Cc: Fuse, Hiroaki (SGC) ; > libc-stable@sourceware.org > Subject: [PATCH] nscd: Move declarations used in the library out of >=20 > Installed the shared header as include/nscd.h. Rename the remaining head= er > with the nscd-internal declarations from nscd/nscd.h to nscd/nscdP.h. >=20 > This makes it clear that the library does not depend on > include/programs/xmalloc.h. >=20 > Tested on i686-linux-gnu and x86_64-linux-gnu. Built with > build-many-glibcs.py. >=20 > --- > include/nscd.h | 99 > +++++++++++++++++++++++++++++ > nscd/aicache.c | 2 +- > nscd/cache.c | 2 +- > nscd/cachedumper.c | 2 +- > nscd/connections.c | 2 +- > nscd/dbg_log.c | 2 +- > nscd/grpcache.c | 2 +- > nscd/hstcache.c | 2 +- > nscd/initgrcache.c | 2 +- > nscd/mem.c | 2 +- > nscd/netgroupcache.c | 2 +- > nscd/nscd-client.h | 2 +- > nscd/{nscd.h =3D> nscdP.h} | 83 ++-------------------= --- > nscd/nscd_conf.c | 2 +- > nscd/nscd_setup_thread.c | 2 +- > nscd/pwdcache.c | 2 +- > nscd/selinux.h | 2 +- > nscd/servicescache.c | 2 +- > nss/nss_db/db-init.c | 2 +- > nss/nss_files/files-init.c | 2 +- > nss/nss_module.c | 2 +- > sysdeps/unix/sysv/linux/nscd_setup_thread.c | 2 +- > 22 files changed, 124 insertions(+), 98 deletions(-) >=20 > diff --git a/include/nscd.h b/include/nscd.h new file mode 100644 index > 0000000000..109e3ab800 > --- /dev/null > +++ b/include/nscd.h > @@ -0,0 +1,99 @@ > +/* Private interface between sncd and NSS service modules. > + Copyright (c) 2011-2023 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See > the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + > + + > Bv3RvKRSx!8TizXXLSPkv5T-YMcMlLIUXmJnM6OEBMlb5lozd03KZ_JUJWVOAI > dSXAD1Vx > + msno4bLOCvcCncBMBxal$ [gnu[.]org]>. */ > + > +#ifndef NSCD_H > +#define NSCD_H > + > +#include > +#include > +#include > + > +/* Handle databases. */ > +typedef enum > +{ > + pwddb, > + grpdb, > + hstdb, > + servdb, > + netgrdb, > + lastdb > +} dbtype; > + > +/* Records the file registered per database that when changed > + or modified requires invalidating the database. */ struct > +traced_file { > + /* Tracks the last modified time of the traced file. */ > + __time64_t mtime; > + /* Support multiple registered files per database. */ > + struct traced_file *next; > + int call_res_init; > + /* Requires Inotify support to do anything useful. */ > +#define TRACED_FILE 0 > +#define TRACED_DIR 1 > + int inotify_descr[2]; > +# ifndef PATH_MAX > +# define PATH_MAX 1024 > +# endif > + /* The parent directory is used to scan for creation/deletion. */ > + char dname[PATH_MAX]; > + /* Just the name of the file with no directory component. */ > + char *sfname; > + /* The full-path name of the registered file. */ > + char fname[]; > +}; > + > +/* Initialize a `struct traced_file`. As input we need the name > + of the file, and if invalidation requires calling res_init. > + If CRINIT is 1 then res_init will be called after invalidation > + or if the traced file is changed in any way, otherwise it will > + not. */ > +static inline void > +init_traced_file(struct traced_file *file, const char *fname, int > +crinit) { > + char *dname; > + file->mtime =3D 0; > + file->inotify_descr[TRACED_FILE] =3D -1; > + file->inotify_descr[TRACED_DIR] =3D -1; > + strcpy (file->fname, fname); > + /* Compute the parent directory name and store a copy. The copy makes > + it much faster to add/remove watches while nscd is running instead > + of computing this over and over again in a temp buffer. */ > + file->dname[0] =3D '\0'; > + dname =3D strrchr (fname, '/'); > + if (dname !=3D NULL) > + { > + size_t len =3D (size_t)(dname - fname); > + if (len > sizeof (file->dname)) > + abort (); > + memcpy (file->dname, file->fname, len); > + file->dname[len] =3D '\0'; > + } > + /* The basename is the name just after the last forward slash. */ > + file->sfname =3D &dname[1]; > + file->call_res_init =3D crinit; > +} > + > +#define define_traced_file(id, filename) \ > +static union \ > +{ \ > + struct traced_file file; \ > + char buf[sizeof (struct traced_file) + sizeof (filename)]; \ > +} id##_traced_file; > + > +#endif /* NSCD_H */ > diff --git a/nscd/aicache.c b/nscd/aicache.c index 96f699c216..1967402a90 > 100644 > --- a/nscd/aicache.c > +++ b/nscd/aicache.c > @@ -29,7 +29,7 @@ > #include >=20 > #include "dbg_log.h" > -#include "nscd.h" > +#include "nscdP.h" >=20 >=20 > static const ai_response_header notfound =3D diff --git a/nscd/cache.c > b/nscd/cache.c index b4b54d82bb..7071855774 100644 > --- a/nscd/cache.c > +++ b/nscd/cache.c > @@ -30,7 +30,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 >=20 > diff --git a/nscd/cachedumper.c b/nscd/cachedumper.c index > a197c081ef..68f9af49f7 100644 > --- a/nscd/cachedumper.c > +++ b/nscd/cachedumper.c > @@ -28,7 +28,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 > static void *the_cache; > diff --git a/nscd/connections.c b/nscd/connections.c index > a405a44a9b..92b29e5148 100644 > --- a/nscd/connections.c > +++ b/nscd/connections.c > @@ -49,7 +49,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" > #include "selinux.h" > #include > diff --git a/nscd/dbg_log.c b/nscd/dbg_log.c index d31e79ceb3..d1e2523356 > 100644 > --- a/nscd/dbg_log.c > +++ b/nscd/dbg_log.c > @@ -20,7 +20,7 @@ > #include > #include > #include "dbg_log.h" > -#include "nscd.h" > +#include "nscdP.h" >=20 > /* if in debug mode and we have a debug file, we write the messages to i= t, > if in debug mode and no debug file, we write the messages to stderr, = diff > --git a/nscd/grpcache.c b/nscd/grpcache.c index cdd1071970..93a9c9e7a0 > 100644 > --- a/nscd/grpcache.c > +++ b/nscd/grpcache.c > @@ -32,7 +32,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 > /* This is the standard reply in case the service is disabled. */ diff = --git > a/nscd/hstcache.c b/nscd/hstcache.c index bd289b4628..a979cff983 100644 > --- a/nscd/hstcache.c > +++ b/nscd/hstcache.c > @@ -35,7 +35,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 >=20 > diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index > be44951bd6..1b9bee5711 100644 > --- a/nscd/initgrcache.c > +++ b/nscd/initgrcache.c > @@ -27,7 +27,7 @@ > #include >=20 > #include "dbg_log.h" > -#include "nscd.h" > +#include "nscdP.h" >=20 > #include "../nss/nsswitch.h" >=20 > diff --git a/nscd/mem.c b/nscd/mem.c > index 50f8162609..07ffcb542d 100644 > --- a/nscd/mem.c > +++ b/nscd/mem.c > @@ -30,7 +30,7 @@ > #include >=20 > #include "dbg_log.h" > -#include "nscd.h" > +#include "nscdP.h" >=20 >=20 > static int > diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index > 06b7d7b6ca..9b317a38cd 100644 > --- a/nscd/netgroupcache.c > +++ b/nscd/netgroupcache.c > @@ -25,7 +25,7 @@ > #include >=20 > #include "../inet/netgroup.h" > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 > #include > diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index > 5588ade982..9126fc83c2 100644 > --- a/nscd/nscd-client.h > +++ b/nscd/nscd-client.h > @@ -450,4 +450,4 @@ extern ssize_t writeall (int fd, const void *buf, siz= e_t len) > extern uint32_t __nscd_get_nl_timestamp (void) > attribute_hidden; >=20 > -#endif /* nscd.h */ > +#endif /* nscd-client.h */ > diff --git a/nscd/nscd.h b/nscd/nscdP.h > similarity index 82% > rename from nscd/nscd.h > rename to nscd/nscdP.h > index 04f82fc0b0..7d5f6e2011 100644 > --- a/nscd/nscd.h > +++ b/nscd/nscdP.h > @@ -15,32 +15,21 @@ > License along with the GNU C Library; if not, see >=20 > 3RvKRSx!8TizXXLSPkv5T-YMcMlLIUXmJnM6OEBMlb5lozd03KZ_JUJWVOAIdS > XAD1Vxmsno4bLOCvcCncBMBxal$ [gnu[.]org]>. */ >=20 > -#ifndef _NSCD_H > -#define _NSCD_H 1 > +#ifndef _NSCDP_H > +#define _NSCDP_H 1 >=20 > #include > #include > #include > #include >=20 > +#include > + > /* The declarations for the request and response types are in the file > "nscd-client.h", which should contain everything needed by client > functions. */ > #include "nscd-client.h" >=20 > - > -/* Handle databases. */ > -typedef enum > -{ > - pwddb, > - grpdb, > - hstdb, > - servdb, > - netgrdb, > - lastdb > -} dbtype; > - > - > /* Default limit on the number of times a value gets reloaded without > being used in the meantime. NSCD does not throw a value out as > soon as it times out. It tries to reload the value from the @@ -60,6= 8 +49,6 > @@ typedef enum > 80% of the thread stack size. */ > #define MAX_STACK_USE ((8 * NSCD_THREAD_STACKSIZE) / 10) >=20 > -/* Records the file registered per database that when changed > - or modified requires invalidating the database. */ > -struct traced_file > -{ > - /* Tracks the last modified time of the traced file. */ > - __time64_t mtime; > - /* Support multiple registered files per database. */ > - struct traced_file *next; > - int call_res_init; > - /* Requires Inotify support to do anything useful. */ > -#define TRACED_FILE 0 > -#define TRACED_DIR 1 > - int inotify_descr[2]; > -# ifndef PATH_MAX > -# define PATH_MAX 1024 > -# endif > - /* The parent directory is used to scan for creation/deletion. */ > - char dname[PATH_MAX]; > - /* Just the name of the file with no directory component. */ > - char *sfname; > - /* The full-path name of the registered file. */ > - char fname[]; > -}; > - > -/* Initialize a `struct traced_file`. As input we need the name > - of the file, and if invalidation requires calling res_init. > - If CRINIT is 1 then res_init will be called after invalidation > - or if the traced file is changed in any way, otherwise it will > - not. */ > -static inline void > -init_traced_file(struct traced_file *file, const char *fname, int crinit= ) -{ > - char *dname; > - file->mtime =3D 0; > - file->inotify_descr[TRACED_FILE] =3D -1; > - file->inotify_descr[TRACED_DIR] =3D -1; > - strcpy (file->fname, fname); > - /* Compute the parent directory name and store a copy. The copy makes > - it much faster to add/remove watches while nscd is running instead > - of computing this over and over again in a temp buffer. */ > - file->dname[0] =3D '\0'; > - dname =3D strrchr (fname, '/'); > - if (dname !=3D NULL) > - { > - size_t len =3D (size_t)(dname - fname); > - if (len > sizeof (file->dname)) > - abort (); > - memcpy (file->dname, file->fname, len); > - file->dname[len] =3D '\0'; > - } > - /* The basename is the name just after the last forward slash. */ > - file->sfname =3D &dname[1]; > - file->call_res_init =3D crinit; > -} > - > -#define define_traced_file(id, filename) \ > -static union \ > -{ \ > - struct traced_file file; \ > - char buf[sizeof (struct traced_file) + sizeof (filename)]; \ > -} id##_traced_file; > - > /* Structure describing dynamic part of one database. */ struct > database_dyn { @@ -375,4 +302,4 @@ extern void nscd_print_cache (const > char *name); > while (__result =3D=3D EINTR); > \ > __result; })) >=20 > -#endif /* nscd.h */ > +#endif /* nscdP.h */ > diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index > ead13e99b8..717ad8b425 100644 > --- a/nscd/nscd_conf.c > +++ b/nscd/nscd_conf.c > @@ -29,7 +29,7 @@ > #include >=20 > #include "dbg_log.h" > -#include "nscd.h" > +#include "nscdP.h" >=20 >=20 > /* Names of the databases. */ > diff --git a/nscd/nscd_setup_thread.c b/nscd/nscd_setup_thread.c index > 5d6eff7a59..d33cd1069f 100644 > --- a/nscd/nscd_setup_thread.c > +++ b/nscd/nscd_setup_thread.c > @@ -15,7 +15,7 @@ > You should have received a copy of the GNU General Public License > along with this program; if not, see > 3RvKRSx!8TizXXLSPkv5T-YMcMlLIUXmJnM6OEBMlb5lozd03KZ_JUJWVOAIdS > XAD1Vxmsno4bLOCvcCncBMBxal$ [gnu[.]org]>. */ >=20 > -#include > +#include >=20 >=20 > int > diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index > e1b579de6b..e89b93fb07 100644 > --- a/nscd/pwdcache.c > +++ b/nscd/pwdcache.c > @@ -32,7 +32,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 > /* This is the standard reply in case the service is disabled. */ diff = --git > a/nscd/selinux.h b/nscd/selinux.h index 3f075b5533..b505654f7f 100644 > --- a/nscd/selinux.h > +++ b/nscd/selinux.h > @@ -19,7 +19,7 @@ > #ifndef _SELINUX_H > #define _SELINUX_H 1 >=20 > -#include "nscd.h" > +#include "nscdP.h" > #ifdef HAVE_LIBCAP > # include > #endif > diff --git a/nscd/servicescache.c b/nscd/servicescache.c index > 2202679500..68663bb1af 100644 > --- a/nscd/servicescache.c > +++ b/nscd/servicescache.c > @@ -25,7 +25,7 @@ > #include > #include >=20 > -#include "nscd.h" > +#include "nscdP.h" > #include "dbg_log.h" >=20 >=20 > diff --git a/nss/nss_db/db-init.c b/nss/nss_db/db-init.c index > bd79826cab..850e8c5fb4 100644 > --- a/nss/nss_db/db-init.c > +++ b/nss/nss_db/db-init.c > @@ -19,7 +19,7 @@ > #ifdef USE_NSCD >=20 > #include > -#include > +#include > #include >=20 > #include "nss_db.h" > diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c index > d5c2795b30..541ad65ffe 100644 > --- a/nss/nss_files/files-init.c > +++ b/nss/nss_files/files-init.c > @@ -19,7 +19,7 @@ > #ifdef USE_NSCD >=20 > #include > -#include > +#include > #include > #include >=20 > diff --git a/nss/nss_module.c b/nss/nss_module.c index > 0104f88974..934ff4a968 100644 > --- a/nss/nss_module.c > +++ b/nss/nss_module.c > @@ -17,7 +17,7 @@ >=20 > 3RvKRSx!8TizXXLSPkv5T-YMcMlLIUXmJnM6OEBMlb5lozd03KZ_JUJWVOAIdS > XAD1Vxmsno4bLOCvcCncBMBxal$ [gnu[.]org]>. */ >=20 > #include > -#include > +#include > #include >=20 > #include > diff --git a/sysdeps/unix/sysv/linux/nscd_setup_thread.c > b/sysdeps/unix/sysv/linux/nscd_setup_thread.c > index cf1a56e005..76d9fad10f 100644 > --- a/sysdeps/unix/sysv/linux/nscd_setup_thread.c > +++ b/sysdeps/unix/sysv/linux/nscd_setup_thread.c > @@ -17,7 +17,7 @@ >=20 > #include > #include > -#include > +#include > #include >=20 >=20 >=20 > base-commit: e18c293af0ece38921ad71fbd76ff8049c3b2d67