Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2002 19:09:31 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        current@FreeBSD.org, net@FreeBSD.org
Subject:   NIS and getpwent(3)
Message-ID:  <20020730160931.GA27626@sunbay.com>

next in thread | raw e-mail | index | archive | help

--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-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020730160931.GA27626>