From owner-freebsd-current Tue Jul 30 9: 9:49 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13E8537B400; Tue, 30 Jul 2002 09:09:42 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A91943E42; Tue, 30 Jul 2002 09:09:37 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g6UG9Vh28818; Tue, 30 Jul 2002 19:09:31 +0300 (EEST) (envelope-from ru) Date: Tue, 30 Jul 2002 19:09:31 +0300 From: Ruslan Ermilov To: current@FreeBSD.org, net@FreeBSD.org Subject: NIS and getpwent(3) Message-ID: <20020730160931.GA27626@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline User-Agent: Mutt/1.3.99i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Sorry for x-posting, not sure where this is more relevant.] Hi! I have hit the following nasty problem with /etc/periodic/daily/300.calendar while using NIS. We have our NIS database distributed with all shells switched off to /sbin/nologin, and overriding shells as necessary on machines where we need it. Something like this: +ru:::::::::/bin/tcsh +::::::::: When calendar(1)'s -a option is in use, the code traverses the list of all users in the getpwent(3) cycle, checks to see if the user has a valid calendar file, and if so, mails him the current entries (if there are). The problem is that the "ru" entry is reported by getpwent(3) twice, first with /bin/tcsh shell, and second with the /sbin/nologin shell. The net effect is that you get your calendar mail twice. Is this the correct behavior of getpwent(3), and then what do we do with calendar(1), or getpwent(3) is in trouble? (I've checked that on both 4.x and 5.0.) Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9Rro7Ukv4P6juNwoRAqjzAJ4meF0n51rPmdbY01m0FUNmXG2t7QCfQZB9 ois0Wv77JRO4YHY1rO0bOgk= =vZdE -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message